php - How to parse multiple html pages into a string? -


i'm trying parse code of multiple html pages string, make buffer, , read string in order find specific text input, everthing ok, problem, i'm not able load pages string , read after.

$url = 'http://www.test.com/'; $start = 0; $end = 1120;  $counter = $start; while ($counter <= $end) {      /*** link search - add counter value , html end of url ***/     $link = "$url$counter.html";     /*** links ***/         $data = file_get_contents($link);         $data = $data.$data; //      echo $data;      $counter = $counter + 15;  } 

could me in case?

regards

$url = 'http://www.test.com/'; $start = 0; $end = 1120; $counter = $start; $data=""; while ($counter <= $end) {     $link = "$url$counter.html";     $res = file_get_contents($link);     if ($res!==false){        $data .=$res;     }     $counter = $counter + 15;  } 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -