php different html parsing results on local and live server

198 views Asked by At

I'm parsing html page. Results are different on local and live server. On local server it displays all information but on live it skips many. Here is my code

<?php
error_reporting(E_ERROR | E_PARSE);

$id = $_GET['video_id'];
$dom = new DOMDocument();

$dom->loadHTMLFile('http://www.ytpak.com/?component=video&task=view&id='.$id);


foreach($dom->getElementsByTagName('a') as $link) {
         echo $link->getAttribute('href');
        echo "<br />";

}

?>

you can check that code on your local server and here is the url of live server http://qasimali.byethost8.com/parser.php?video_id=mzhzUnttW44 I'm searching and trying for last 36 hours and I couldn't find out the solution. plz help :)

0

There are 0 answers