我在通过API下载我在网站www.slideshare.net上可用的幻灯片时遇到问题,无论它们是公开的还是私有的,我都无法下载自己拥有的所有幻灯片。你能帮我吗?
$apikey = 'apikey';
$secret = 'secret';
$ts = time();
$hash = sha1($secret.$ts);
$postdata = '&api_key='.$apikey.'&ts='.$ts.'&hash='.$hash;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://www.slideshare.net/api/2/get_slideshow";);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
$output = curl_exec($ch);
if ($output === FALSE) {
echo "cURL Error: " . curl_error($ch);
} else {
var_dump($output);
}
curl_close($ch);