Voici un petit bout de code bien pratique pour retourner dans une variable le code HTTP d’une page web (200, 404, …)
$host= »http://www.bugbug.fr »;
$robots=get_headers($host);
preg_match(‘`([0-9]{3})`’, $robots[0], $array_destination);
echo $array_destination[0];…