1. Go to this page and download the library: Download moazam1/yelp-php 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/ */
$client = new \Stevenmaguire\Yelp\v3\Client(array(
'accessToken' => $accessToken,
));
// Create a new guzzle http client
$specialHttpClient = new \GuzzleHttp\Client([
// ... some special configuration
]);
// Update the yelp client with the new guzzle http client
// then get business data
$business = $client->setHttpClient($specialHttpClient)
->getBusiness('the-motel-bar-chicago');
// Create request for other yelp API resource not supported by yelp-php
$request = $client->getRequest('GET', '/v3/some-future-endpoint');
// Send that request
$response = $client->getResponse($request);
// See the contents
echo $response->getBody();