Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 7th, 2006, 06:25 PM
cyber0ne
Guest
 
Posts: n/a
Default Sending an HTTP request and reading the response

I'm a bit new to PHP. One thing I'm trying to do right now is send an
HTTP request and read the response in the code. For an example of what
I'm talking about, see this:

http://www.google.com/apis/maps/docu...g_HTTP_Request

Would someone be able to show me a quick example of how to do this in
my PHP code? I have a page that gets the "address" value posted to it
from a form. Now I need to pass that value to the HTTP request and
read back the response. Then I'll need that response in the form of a
$latitude value and a $longitude value.

Any help would be much appreciated. Thank you.

  #2  
Old August 7th, 2006, 06:35 PM
Chung Leong
Guest
 
Posts: n/a
Default Re: Sending an HTTP request and reading the response

cyber0ne wrote:
Quote:
I'm a bit new to PHP. One thing I'm trying to do right now is send an
HTTP request and read the response in the code. For an example of what
I'm talking about, see this:
>
http://www.google.com/apis/maps/docu...g_HTTP_Request
>
Would someone be able to show me a quick example of how to do this in
my PHP code? I have a page that gets the "address" value posted to it
from a form. Now I need to pass that value to the HTTP request and
read back the response. Then I'll need that response in the form of a
$latitude value and a $longitude value.
>
Any help would be much appreciated. Thank you.
$contents = file_get_contents($url);

Quick enough?

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles