Re: Getting data from a web page



On Jan 30, 12:34 pm, "laredotorn...@xxxxxxxxxxx"
<laredotorn...@xxxxxxxxxxx> wrote:

If I type this URL into my browser:

http://maps.google.com/maps/geo?q=980+PEMART+AVE+PEEKSKILL,+NY+10566&;...

I get a simple comma-delimited list of data. What I would like to do
is in my PHP script, request this URL and then put the return values
into an array. How do I do this?

$URL = 'http://maps.google.com/maps/geo?q=...';
$dataArray = explode(',', trim(file_get_contents($URL)));

Cheers,
NC
.



Relevant Pages

  • Can php emulate internet explorer browser requests ?
    ... I'm looking to post data to a site using a php script - commands ... is because the server is expecting the request to come from a browser. ...
    (comp.lang.php)
  • Getting data from a web page
    ... I'm using php 4.4.4. ... type this URL into my browser: ... request this URL and then put the return values ... into an array. ...
    (comp.lang.php)
  • Re: Getting data from a web page
    ... I'm using php 4.4.4. ... type this URL into my browser: ... request this URL and then put the return values ... into an array. ...
    (comp.lang.php)
  • Re: Getting data from a web page
    ... type this URL into my browser: ... is in my PHP script, request this URL and then put the return values ... PHP professionals looking for PHP jobs ...
    (comp.lang.php)
  • Re: Custom 401 page problems
    ... Since you configured IIS to send a staic for this ... Now, a 401 response comes back to the client, and the entite body is the ... it is going to make a new request for this resource ... What request do you think the browser makes to fetch the 401.gif ??? ...
    (microsoft.public.inetserver.iis)