Question

How should I configure cURL to retrieve data from the yahoo maps api?

Here is the current code

curl_setopt($ch, CURLOPT_TIMEOUT, 5000);
curl_setopt($ch, CURLOPT_URL, $geocodeurl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);

Which returns a 400 - Bad request HTML file. I've checked $geocodeurl and it is a valid XML file, so I figure the problem must be the cURL options?


$geocodeurl is

 http://where.yahooapis.com/geocode?appid=** My App ID **&q=Battle%20Creek,MI&gflags=R

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top