Follow links in PHP.

Good day.
Please tell me how to make a link.
You need to make a parser and follow all the links on the parsed page.


Answer 1, authority 100%

//  
$page = file_get_contents('http://../1.php?blabla=..');
if( preg_match('~<a.*?href=(['"]*)(.*?)\\1~is', $page, $m ) ){
   foreach( $m[1] as $k=> $url ){
     // $url =    .         
      file_get_contents( $url ); //    url
   }
}