PHP code example of nfreear / cloudsight-http-client
1. Go to this page and download the library: Download nfreear/cloudsight-http-client 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/ */
nfreear / cloudsight-http-client example snippets
use Nfreear\Cloudsight\Cloudsight_Http_Client;
$client = new CloudSight_Http_Client($api_key);
$request = $client->postImageRequests($image_url);
while (1) {
sleep(1);
$result = $client->getImageResponses($request->token);
// Check if analysis is complete.
if ($client->isComplete()) {
break;
}
}
echo "Complete. ALT text: " . $result->name;