I’m struggling getting an array of LS cities… file_get_contents() returns an empty dropdown on their roadblock requiring you to select cities. Unfortunately it’s empty… so then I thought it was coming from an ajax request. But looking at the page I don’t see any ajax requests on the page. Then I tried CURL, thinking that maybe simulating a browser would help… the below code had no affect.
$ch = curl_init("http://www.URL.com/");
curl_setopt($ch, CURLOPT_VERBOSE, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)');
$result=curl_exec($ch);
var_dump($result);
Does anyone have any ideas on how I can get a solid list of available areas?
Perhaps a bit late, but you don’t need to couple to our JavaScript to obtain the cities list. We have an API for that:
https://sites.google.com/a/hungrymachine.com/livingsocial-api/home/cities