//HERE WE'RE GOING TO SEND OUR LAT/LONG TO GOOGLE MAPS AND THEN //SCRAPE THE RETURNED WEB PAGE TO SEE IF STREET VIEW IS //AVAILABLE.
//IF STREET VIEW IS AVAILABLE, WE'LL PARSE THE STREET VIEW //CAMERA LAT/LONG AND HEADING FROM THE PAGE TO USE IN OUR SV //CANVAS
$data = file_get_contents('http://maps.google.com/maps?q=' . $bestlat . ',' . $bestlong);
if(preg_match('/cbp=([^;]*)&/',$data,$match)){
$cbp_params = $match[1];
$cbp_params = explode(',',$cbp_params);
$bestSVheading = $cbp_params[1];
}
if(preg_match('/cbll=([^;]*)&/',$data,$match)){
$cbll_params = $match[1];
$cbll_params = explode(',',$cbll_params);
$bestSVlat = $cbll_params[0];
$bestSVlong = $cbll_params[1];
}