I have to write a program, that tells me the shortest way between two points. The traffic shouldn't be regarded.
My Request is this.
'http://maps.googleapis.com/maps/api/directions/json?origin='.$from.'&destination='.$to.'&alternatives=true&sensor=false'
Then I take the shortest route this way
$data = json_decode(file_get_contents($url))->routes;
usort($data,create_function('$a,$b','return intval($a->legs[0]->distance->value) - intval($b->legs[0]->distance->value);'));
return floatval($data[0]->legs[0]->distance->text);
But this result depends to the actual traffic. How can I send a request, that ignores the actual traffic?