mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-25 20:59:06 +00:00
8dc70ee37b
(we update the API endpoint, and will be requiring client_id's starting Dec1) Thanks! -Eric
15 lines
319 B
PHP
15 lines
319 B
PHP
<?php
|
|
require '../src/Curl/Curl.php';
|
|
|
|
use \Curl\Curl;
|
|
|
|
$curl = new Curl();
|
|
$curl->get('https://domainr.com/api/json/search', array(
|
|
'client_id' => 'php_curl_class',
|
|
'q' => 'example',
|
|
));
|
|
|
|
foreach ($curl->response->results as $result) {
|
|
echo $result->domain . ' is ' . $result->availability . '.' . "\n";
|
|
}
|