• 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

Passing PHP JSON to Javascript: echo json_encode vs echo json declaration

Creating a config file in PHP

The difference when using if statement true === something() vs something() === true [duplicate]

ConstraintViolationListInterface to Exception in Symfony

Laravel 5 issue with wherePivot

Yii2: How to download backup files using spanjeta/yii2-backup?

Timber: Single post pagination does not work (wp_link_pages)

Laravel query builder binding parameters more than once

php - add comma thousands separator but remove trailing zeros

Get keys from associative array [duplicate]

PHP - Store information with NO database

How do I Post to .txt document before form submits

Require a class from another class - php

How to submit the custom form data in database in WordPress without plugin using ajax?

Minimum order amount except for specific shipping method in WooCommerce

About Contact Privacy policy Terms and conditions