Re: Getting data from a web page
- From: Manuel Lemos <mlemos@xxxxxxx>
- Date: Wed, 30 Jan 2008 21:39:13 -0200
Hello,
on 01/30/2008 06:34 PM laredotornado@xxxxxxxxxxx said the following:
I'm using php 4.4.4. What I want to do is hopefully simple. If I
type this URL into my browser:
http://maps.google.com/maps/geo?q=980+PEMART+AVE+PEEKSKILL,+NY+10566&output=csv&
key=ABQIAAAAuHEWowxYzDRtZwy5bJee6RRepaxJ09NBCcZ4ddHPnTvG1CBwlxTqGOXX0DHtp5WHcsP7cJ-K0vvurg
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?
For simple requests like that, you can just call:
$csv = file_get_contents('http://maps.google.com/maps/geo?
q=980+PEMART+AVE+PEEKSKILL,+NY+10566&output=csv
&key=ABQIAAAAuHEWowxYzDRtZwy5bJee6RRepaxJ09NBCcZ4ddHPnTvG1CBwlxTqGOXX0DHtp5WHcsP7cJ-K0vvurg');
--
Regards,
Manuel Lemos
PHP professionals looking for PHP jobs
http://www.phpclasses.org/professionals/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
.
- References:
- Getting data from a web page
- From: laredotornado@xxxxxxxxxxx
- Getting data from a web page
- Prev by Date: Re: curl attack prevention
- Next by Date: Re: Getting data from a web page
- Previous by thread: Re: Getting data from a web page
- Next by thread: Re: Getting data from a web page
- Index(es):
Relevant Pages
|