Skip to content

API Example Without Composer

danhstevens edited this page Dec 24, 2014 · 2 revisions

For those that don't want to use composer, the following code snippet should allow for verification using cURL:

 
$ch = curl_init();
$url = 'https://api.kickbox.io/v1/verify?email=' . urlencode($email) . '&apikey=' . $apiKey;
curl_setopt($ch, CURLOPT_URL,            $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT,        20);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
$response = curl_exec($ch);
$errno = curl_errno($ch);
$errorstr = curl_error($ch);
curl_close($ch);
 
$verify = json_decode($response, true);
 
var_dump($verify);
Clone this wiki locally