PHP code example of boehm_s / php-proximity-hash

1. Go to this page and download the library: Download boehm_s/php-proximity-hash library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

boehm_s / php-proximity-hash example snippets


use boehm_s\ProximityHash;

$latitude  = 48.858156;
$longitude = 2.294776;
$radius    = 1000;     // in meters
$precision = 6;        // number of characters in the geohashes generated
    
$res = ProximityHash::generate($latitude, $longitude, $radius, $precision);