Created
August 18, 2014 13:14
-
-
Save chiliec/df30efe91d9e2daab9ac to your computer and use it in GitHub Desktop.
Дебажил DISQUS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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