videoslasher视频下载脚本php

videoslasher视频下载脚本php,php,curl,Php,Curl,我从videoslasher.com下载视频时遇到问题。我写了一个脚本来获取源代码链接,它工作得很好 示例链接: 但当我下载脚本时,我得到403(禁止)。 下载视频代码: $headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0'; $headers[] = 'Accept: text/html,application/xhtml+xml,applicat

我从videoslasher.com下载视频时遇到问题。我写了一个脚本来获取源代码链接,它工作得很好

示例链接:

但当我下载脚本时,我得到403(禁止)。 下载视频代码:

$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:19.0) Gecko/20100101 Firefox/19.0';
$headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
$headers[] = 'Accept-Language: pl,en-us;q=0.7,en;q=0.3';
$headers[] = 'Accept-Encoding: gzip, deflate';
$headers[] = 'Connection: keep-alive';


$ch = curl_init();        
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_REFERER, 'http://www.videoslasher.com/static/player/flowplayer.commercial-3.2.7.swf');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

curl_setopt($ch, CURLOPT_COOKIEFILE,'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_BUFFERSIZE, 4096000);
echo curl_exec($ch);     
curl_close($ch);

有人知道可能是什么问题吗?

我在尝试访问浏览器中的URL时被禁止使用403。可能需要用户登录?这是示例链接。这个链接不起作用(我想它已经过期了)。我认为问题在于,videoslasher正在阻止机器人程序/脚本