$address = $_POST['address']; $city = $_POST['city']; $state = $_POST['state']; $zip = $_POST['zip'];to this:
$url = "http://api.local.yahoo.com/MapsService/V1/geocode?appid=crappyfiles&street=".$address."&city=".$city."&state=".$state."&zip=".$zip."";I then need to parse that XML and pull 3 values from the results which looks like this:
<ResultSet xsi:schemaLocation="urn:yahoo:maps http://api.local.yahoo.com/MapsService/V1/GeocodeResponse.xsd"> - <Result precision="address"> <Latitude>41.77769</Latitude> <Longitude>-93.729599</Longitude> <Address>237 N CHEROKEE DR</Address> <City>POLK CITY</City> <State>IA</State> <Zip>50226-1182</Zip> <Country>US</Country> </Result> </ResultSet>I need to pull the longitude, latitude and zip code from that generated xml and have it be the following variables:
$lng = longitude $lat = latitude $zip = zip
I am a total noob and need help doing this. I know its not that hard for some of you, so if you have a little time I would really appreciate it.