PHP code example of aamant / distance

1. Go to this page and download the library: Download aamant/distance 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/ */

    

aamant / distance example snippets

 php
$distance = new Distance(
	new GoogleMapProvider(new CurlHttpAdapter, 'fr-FR', GoogleMapProvider::MODE_BICYCLING));
$result = $distance->distance(array('montpellier'), array('paris', 'perpignan', 'lyon'));