• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Get lat/lon from google maps url ftid (hex)

phpandroidgoogle-mapslocationhex


PHP Snippet 1:

!1s0x6ad63fbf56e24c27:0xe665b3308d32f379

PHP Snippet 2:

0xe665b3308d32f379  ---hex-to-dec--->  16601872622479930233

PHP Snippet 3:

function ftid_to_latlong($ftid)
{
    $fetch = curl_request("https://www.google.com/maps?ftid=$ftid");
    preg_match("/\"$ftid\",.*?(\d+\.\d+),(\d+\.\d+)/", $fetch, $geo);
    return [$geo[1], $geo[2]];
}

Related Snippets

retrieve data from database using session

WHERE IN array binding in DB::raw laravel 5.4

PhpSpreadSheet: How to save Workbook sheets in individual CSV files

Facebook PHP SDK - will not logout properly

Composer fails with kylekatarnls/update-helper on new homestead

How to submit a form when page loads using JavaScript?

Laravel websockets AWS EC2 - Connection failed

Add rows to Single product Additional information table in WooCommerce 3.6

Prestashop cUrl Login

What is the function of the (new Date()).getTime() in PHP?

I'm trying to use curl with php but getting this error:Could not resolve host: Bearer

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

Image upload not working through ajax Laravel

How to solve cURL error 60: SSL certificate in Laravel 5 while Facebook authentication

CodeIgniter 4: Like and Dislike Functionality

About Contact Privacy policy Terms and conditions