I am trying to pass the Latitude and Longitude as a variable in PHP to fetch static Google Maps , But this just picks up one Image despite of changing the co ordinates .Please help
*
<?php
session_start();
$latitude=doubleval($_POST['latitude']);
$longitude=doubleval($_POST['longitude']);
$cordinate=$latitude.",".$longitude;
$cordinate1=doubleval($cordinate);
echo $latitude;
echo $longitude;
$src='https://maps.googleapis.com/maps/api/staticmap?center=($latitude,$longitude)&zoom=20&size=640x640&maptype=satellite&key=MyKey';
$time=strval(mktime());
$destfolder='images/';
$mapImgName=$time."google-map.PNG";
$imagePath=$destfolder.$mapImgName
file_put_contents($imagePath,file_get_contents($src));
?>
<img src="<?php echo $imagePath; ?>"/>