I am using the following code
for($pagina=50;$pagina<60;$pagina++){
$data = file_get_contents("http://www.pagina.net/?p=".$pagina);
if ( preg_match('|<h2 class="titulo">(.*?)</h2>|is' , $data , $cap ) )
{
echo '<br><b>'.$cap[1] .'</b>';
}
}
?>
In case a page for example: www.pagina.net/?php="200 "gives me an error 404 not found as I would to identify it in php and make a condition if?
Something like this:
if( $data = 404 not found)
{ echo "no rastrear" }
else { seguir rastreando }
I'm grabbing your help