URL GET

This is a discussion on URL GET within the alt.comp.lang.php forums, part of the PHP Programming Forums category; I want to make a call to a HTTP api, and retrieve the results, but don't want to go ...


Go Back   Usenet Forums > PHP Programming Forums > alt.comp.lang.php

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-24-2003
furry
 
Posts: n/a
Default URL GET

I want to make a call to a HTTP api, and retrieve the results, but don't
want to go to the trouble of doing a form post.

How can I call http://domain.com/api?foo=bar and retrieve the result using
PHP ?

Thanks in advance.


Reply With Quote
  #2 (permalink)  
Old 10-24-2003
Janwillem Borleffs
 
Posts: n/a
Default Re: URL GET


"furry" <cbtsys@iol.ie> schreef in bericht
news:bnbkbs$bgt$1@kermit.esat.net...
> I want to make a call to a HTTP api, and retrieve the results, but don't
> want to go to the trouble of doing a form post.
>
> How can I call http://domain.com/api?foo=bar and retrieve the result using
> PHP ?
>


With one of the following:

http://www.php.net/fopen
http://www.php.net/file
http://www.php.net/file_get_contents
http://www.php.net/fsockopen


JW



Reply With Quote
  #3 (permalink)  
Old 10-27-2003
Ian P. Christian
 
Posts: n/a
Default Re: URL GET

Janwillem Borleffs wrote:

>
> "furry" <cbtsys@iol.ie> schreef in bericht
> news:bnbkbs$bgt$1@kermit.esat.net...
>> I want to make a call to a HTTP api, and retrieve the results, but don't
>> want to go to the trouble of doing a form post.
>>
>> How can I call http://domain.com/api?foo=bar and retrieve the result
>> using PHP ?
>>

>
> With one of the following:


Good starting points from Janwillem there, however I would also suggest
looking into the PHP curl libraries, and the PEAR HTTP functions (I
personally use the latter, I don't like curl, each to thier own)

Kind Regards,

--
Ian P. Christian
http://www.fuzzmail.co.uk ~ Free, Fast and Fuzzy webmail
Reply With Quote
  #4 (permalink)  
Old 10-28-2003
furry
 
Posts: n/a
Default Re: URL GET

thanks guys. My host does not have PEAR installed, so I'll go with fopen

furry


"Ian P. Christian" <pookey@pookey.co.uk> wrote in message
news:bniv0u$p3b$2@goat.anlx.net...
Janwillem Borleffs wrote:

>
> "furry" <cbtsys@iol.ie> schreef in bericht
> news:bnbkbs$bgt$1@kermit.esat.net...
>> I want to make a call to a HTTP api, and retrieve the results, but don't
>> want to go to the trouble of doing a form post.
>>
>> How can I call http://domain.com/api?foo=bar and retrieve the result
>> using PHP ?
>>

>
> With one of the following:


Good starting points from Janwillem there, however I would also suggest
looking into the PHP curl libraries, and the PEAR HTTP functions (I
personally use the latter, I don't like curl, each to thier own)

Kind Regards,

--
Ian P. Christian
http://www.fuzzmail.co.uk ~ Free, Fast and Fuzzy webmail


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:44 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0