fastread homefastrread library fastread menu

PHP Tutorial : Get latitude and longitude from zip code using PHP

Tutorial by:Admin      Date: 2016-04-14 02:12:26

❰ Previous Next ❱

The following PHP function will generate Latitude and Longitude from given zip code.

function getLnt($zip){
$url = "
$result_string = file_get_contents($url);
$result = json_decode($result_string, true);
return $result3[0];

To display output:

 $val = getLnt('90001');
 echo "Latitude: ".$val['lat']."<br>";
 echo "Longitude: ".$val['lng']."<br>";


❰ Previous Next ❱

PHP Tutorial

Submit Your Thought, Tutorial, Articls etc.

Submit Your Information India's Number one online promotion website