Re: [PHP] how to curl






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


Relevant Pages

  • Re: Action pass-through with a form variable Access 2003
    ... variables don't exist on the server where it will execute. ... You can use variables in a regular query that will first be processed by the ... Jet or ACCDB database engine before being handed over to the ODBC driver. ...
    (comp.databases.ms-access)
  • Re: Action pass-through with a form variable Access 2003
    ... You can't "integrate variables into a pass-through query" because those ... variables don't exist on the server where it will execute. ...
    (comp.databases.ms-access)
  • Query governor problem
    ... advanced server and Windows 2003 server. ... The query will normally execute in less than a second. ... the cpu estimate used by the query governor will always be for the ...
    (microsoft.public.sqlserver.server)
  • How can I find out information about process based on spid?
    ... sometimes I cannot connect to the server using enterprise ... execute sp_who2 from query analyzer... ... This stored procedure provides me with the list of spids ...
    (microsoft.public.sqlserver.server)
  • Re: File Upload - Security Issues
    ... uploaded and the user could upload any or all of these in theory. ... There is no one product that can give you 100% security, ... > Code doesn't execute in local memory space unless remote user has rights ... > You don't have MS Office installed on the server. ...
    (microsoft.public.scripting.vbscript)