Skip to content

Instantly share code, notes, and snippets.

@briancarycom
Created October 5, 2012 01:13
Show Gist options
  • Save briancarycom/3837487 to your computer and use it in GitHub Desktop.
Save briancarycom/3837487 to your computer and use it in GitHub Desktop.
Testing the ReTargeter API
$endpoint = "http://apidev.retargeter.com/api/retargeter/test";
$data = array(
"action" => "test",
"sandbox"=>"true"
);
$ch = curl_init($endpoint);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-API-KEY: 1a5fa601e7785a4d521452e25f66a678f39fb539'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
var_dump($response);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment