1. Go to this page and download the library: Download what3words/w3w-php-wrapper 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/ */
what3words / w3w-php-wrapper example snippets
"what3words/w3w-php-wrapper": "3.*"
use What3words\Geocoder\Geocoder;
use What3words\Geocoder\AutoSuggestOption;
$api = new Geocoder("<Secret API Key>");
use What3words\Geocoder\Geocoder;
use What3words\Geocoder\GeocoderOptions;
$options = GeocoderOptions::referer("https://my.site.com/*")->headers(["X-Custom-Header: my.site.com"]);
$api = new Geocoder("<Secret API Key>", $options);