所以我一直在研究一个 php 解析器。本质上,它应该做的是解析视频 url 的 filenuke。但是,当运行以下脚本并单击播放时,它说找不到视频,但是当您加载常规 filenuke URL 时,视频会播放。不知道怎么办,谢谢!
<?php
include("simple_html_dom.php");
$url = "http://filenuke.com/fizzoquaog43";
$cookie = tmpfile();
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31');
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
$contents = curl_exec($ch);
curl_close($ch);
$html = new simple_html_dom();
$html->load($contents);
$items = $html->find("input[name=id]");
$items2 = $html->find("input[name=fname]");
$items3 = $html->find("input[name=referrer]");
foreach($items as $element) {
$fid = $element->value;
}
foreach($items2 as $element2) {
$fname = $element2->value;
}
foreach($items3 as $element3) {
$referrer = $element3->value;
}
$data = array(
'op' => 'download1',
'usr_login' => '',
'method_free' => 'free',
'referrer' => null,
'id' => $fid,
'filename' => $fname
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.64 Safari/537.31');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
$page = curl_exec($ch);
curl_close($ch);
echo $page;
?>