Rasmus Lerdorf wrote:
<?php
if(!empty($_POST['loc'])) {
$src =
"http://api.local.yahoo.com/MapsService/V1/mapImage?appid=YahooDemo";
$src.= "&location=".urlencode($_GET['loc']).
"&output=php&image_width=300&image_height=300&zoom=7";
header("Content-type: application/x-json");
echo json_encode(unserialize(file_get_contents($src)));
exit;
}
?>
Typo in the above. $_GET['loc'] should be $_POST['loc']. I switched
from GET to POST and missed this one. The next version of the Yahoo
libs coming out soon will have GET support. My previous example was a
touch ahead of the released version.
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php