1. Go to this page and download the library: Download iseed838/photon-api 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/ */
iseed838 / photon-api example snippets
$client = new \Photon\Models\PhotonClient(new \GuzzleHttp\Client());
$request = new \Photon\Models\PhotonQueryRequest([
'query' => "Moscow Valilova 6",
]);
$response = $client->query($request);
$client = new \Photon\Models\PhotonClient(new \GuzzleHttp\Client());
$request = new \Photon\Models\PhotonReverseRequest( [
'latitude' => 55.630358,
'longitude' => 37.516776,
]);
$response = $client->reverse($request);