Re: [PHP] how to curl
- From: mak.gnu@xxxxxxxxx ("mukesh yadav")
- Date: Mon, 11 Aug 2008 13:00:20 +0530
mukesh,
im happy to respond, but please keep the conversation on the list, so that
others may benefit by having it available in the archives.
Hey I dint realize that the question is going only to you.
i have a few questions as well; is the query being executed on the provider
system (that is the one you intend to send the http request to)? also, are
you writing and deploying code to both of these systems, or just on the
consumer (the one you intend to execute the curl request from)?
Yes I'm doing on the both the server. And when a consumer server will send
the query to provider's server the query will execute on provider server and
then it will pass the result to the consumer's server. Its just like a
Registration of the key. where consumer will check for the right key on the
provider's server.
in your case, i would expect the provider to expose some url that would
essentially represent the query you intend to execute. it would then expect
the consumer to provide an id during the request, so that it can use that in
the query. then it would return the result, nearly verbatim from the
database.
so, if the provider supported the method as http GET, you might see
something like this, which you would execute via curl,
http://myrestapi.com/getAllFromTable?id=56
then, the provider would grab the id right out of $_GET (if it were also
written in php).
-nathan
Since I'm trying to do on both side, so I'll provide the http GET method.
can you please give small e.g. for both side.
thank you
- References:
- how to curl
- From: "mukesh yadav"
- Re: [PHP] how to curl
- From: "Nathan Nobbe"
- Re: [PHP] how to curl
- From: "Nathan Nobbe"
- how to curl
- Prev by Date: SV: SV: SV: [PHP] Send a cookie with a file_get_contents( ) request?
- Next by Date: Re: SV: SV: SV: [PHP] Send a cookie with a file_get_contents( ) request?
- Previous by thread: Re: [PHP] how to curl
- Next by thread: Re: how to curl
- Index(es):
Relevant Pages
|