View Full Version : how do i retrieve a web page

08-14-2012, 09:46 PM
guys hey, im working on an assignment. i have a form; what town, what city, what country.
users fill out the address fields in the form. the info submitted via the form gets passed to variables using
$_GET , and i then build a google map url from the variables.

the url is for a google api thingy. im supposed to fetch the lattitude and longtitude from the following page,
maybe the link will work -


anyhow, im trying to bite off small little chunks. i have the form built, and now i have the url built.
what im wondering is, how do i tell php to go to this url?

cheers for reading
redd .

Len Whistler
08-15-2012, 12:00 AM
RE: how do i retrieve a web page?

With file_get_contents(). You then can use preg_match() to pull out only the data you want. You have to be more specific about what you want.


08-15-2012, 12:02 AM
legend. thank you

08-15-2012, 12:50 AM
that worked a treat