Skip to content

Instantly share code, notes, and snippets.

@vijaykc
Last active May 8, 2016 19:38
Show Gist options
  • Save vijaykc/96014191def232364b9fee20dd24ed1c to your computer and use it in GitHub Desktop.
Save vijaykc/96014191def232364b9fee20dd24ed1c to your computer and use it in GitHub Desktop.
<?php
$resCurl = curl_init();
//set URL and other appropriate options
curl_setopt($resCurl, CURLOPT_URL, "https://partnerapi.biotrustapps.com/v1/contactcheck?email=pmedia.victor@yahoo.com");
curl_setopt($resCurl, CURLOPT_HTTPHEADER, array('x-api-key: VuLdqJDU2z6KgtmarX2QK7VMQVfUI5vt20NA3EwB')); //setting custom header
curl_setopt($resCurl, CURLOPT_HEADER, true);
curl_setopt($resCurl, CURLOPT_NOBODY, true);
curl_setopt($resCurl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($resCurl, CURLOPT_FOLLOWLOCATION, true);
//get the headers
$strHeaders = curl_exec($resCurl);
//close cURL
curl_close($resCurl);
echo $strHeaders;
@RonniSkansing
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment