开发者

How the server recognizes that this is not a man?

I need get flv file from filmix.net/uzhasy/14482-tayna-bermudskogo-treugolnika-the-bermuda-triangle-1987.html When I go to the server via a browser link to. flv file I found and it can save the file.

And when I do a php script, the link does not work.

video-10.filmix.net/s/37d6764a8f8e43bd754f53431c2e79ce/_02/The.Bermuda.Triangle.1978.DVDRip.flv - work video-10.filmix.net/s/d93d70a78428816b714882c678c39230/_02/The.Bermuda.Triangle.1978.DVDRip.flv - not work.

I have tried so:

$viart_xml = fsockopen("filmix.net", 80, $errno, $errstr, 12); 

   fputs($viart_xml, "GET /uzhasy/14482-tayna-bermudskogo-treugolnika-the-bermuda-triangle-1987.html HTTP/1.1\r\n"); 
   fputs($viart_xml, "Host: filmix.net\r\n"); 
  fputs($viart_xml, "User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13\r\n\r\n"); 
fputs($viart_xml, "Accept-Language: ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3\r\n");
fputs($viart_xml, "Accept-Encoding: gzip,deflate\r\n");
  fputs($viart_xml, "Accept-Charset: windows-1251,utf-8;q=0.7,*;q=0.7\r\n");
  fputs($v开发者_开发知识库iart_xml, "Keep-Alive: 115\r\n");
  fputs($viart_xml, "Connection: keep-alive\r\n\r\n");


if (!$viart_xml) { 
   echo "$errstr ($errno)<br />\n"; 
} else { 
   $content = ""; 
   while (!feof($viart_xml)) { 
       $content .= fgets($viart_xml, 1000000); 

   } 
   fclose($viart_xml); 
   echo $content; 

end:

function download_pretending($url,$user_agent='Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)') 
{ 
$ch = curl_init(); 
curl_setopt ($ch, CURLOPT_URL, $url); 
curl_setopt ($ch, CURLOPT_USERAGENT, $user_agent); 
curl_setopt ($ch, CURLOPT_HEADER, 0); 
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); 
curl_setopt ($ch, CURLOPT_REFERER, 'www.yandex.ru');
$result = curl_exec ($ch); 
curl_close ($ch); 
return $result; 

why links are different?


Did you notice those hexadecimal codes?

37d6764a8f8e43bd754f53431c2e79ce
d93d70a78428816b714882c678c39230

In my opinion, with this very quick reverse-engineering, these are some kind of one-shot control codes.

These codes may (I said may, because I don't know)

  • Put a limit on 1 download of the file (when you refresh the page a new code is generated)
  • Be bound to your IP (so if you run PHP from another server they discover you're cheating)
  • Be bound to a session and/or some cookies, which you should mimic in your grabber.

My answer is

that with your code you can't break this download protection because at least one of the above reasons -or more unknown-, but it's not impossible. I don't know how "ethical" is to help you abuse of downloads (surely the content provider is unhappy if you don't watch ads on the web page or are able to redistribute the content).

By the way, lots of developers daily break every FLV protection that YouTube enforces, and this is why YT downloaders exist. The same applies to you, just put more effort and use more Wireshark ;)


You don't have session information. There will probably be a cookie set that blocks this deep linking to the flv files.


Put a limit on 1 download of the file (when you refresh the page a new code is generated) Be bound to your IP (so if you run PHP from another server they discover you're cheating) Be bound to a session and/or some cookies, which you should mimic in your grabber. Use http grabber http://vidozon.com

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜