parsing - PHP video site parser -


so i've been working on php parser. supposed parser filenuke video url. however, when running following script , clicking play says video not found, when load regular filenuke url video plays. don't know do, thanks!

<?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, 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 $element) {     $fid = $element->value; } foreach($items2 $element2) {     $fname = $element2->value; } foreach($items3 $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, 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;  ?> 

if using composer, try php video url parser instead of making own.

for example : https://github.com/ricardofiorani/php-video-url-parser


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -