Re: Ajax please....
| From: | Rasmus Lerdorf | Date: | Sat, 08 Apr 2006 07:34:44 +0000 |
| Subject: | Re: Ajax please.... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-233526@lists.php.net to get a copy of this message | ||
Rasmus Lerdorf wrote:
<?php if(!empty($_POST['loc'])) { $src = "http://api.local.yahoo.com/MapsService/V1/mapImage?appid=YahooDemo"; $src.= "&location=".urlencode($_GET['loc']).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"&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; } ?>