• 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

Show date difference as "20" instead of "20 years ago"

Upload a file Using PHP and JavaScript

Composer Warning: openssl extension is missing. How to enable in WAMP

How to retrieve Active Directory group policy maximum password age using LDAP

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

Hi, I am making a contact form thingy, and my php isn't working any reason why?

Laravel 8 factory state afterCreating

OctoberCMS / Anonymous Global Scope

NGINX: connect() to unix:/var/run/php7.2-fpm.sock failed (2: No such file or directory)

Magento Installation SQLSTATE[HY000] [2002] No such file or directory error

Extract string between first whitespace and last whitespace in php

Laravel/docker-compose/redis - Class 'Redis' not found

Mysqli Output to a table

Call authenticate manually in router middleware

Is it possible to change the table name in the migration file-laravel

About Contact Privacy policy Terms and conditions