Skip to content

Instantly share code, notes, and snippets.

@chiliec
Created August 18, 2014 13:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiliec/df30efe91d9e2daab9ac to your computer and use it in GitHub Desktop.
Save chiliec/df30efe91d9e2daab9ac to your computer and use it in GitHub Desktop.
Дебажил DISQUS
<?php
$url ='https://disqus.com/api/3.0/threads/close.json?api_secret=xxx...';
$header = array("Accept: application/json");
$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_ENCODING, "gzip");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)');
$retValue = curl_exec($ch);
$response = json_decode(curl_exec($ch));
$ee = curl_getinfo($ch);
print_r($ee);
print_r($retValue);
//оказалось дополнительные права нужны для приложения
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment