|
Posted by Csaba Gabor on 11/14/07 00:09
On Nov 13, 12:00 pm, AK <danr...@gmail.com> wrote:
....
> Can anyone tell me how to connect to a URL using PHP for the purpose
> of obtaining the HTTP response code? Specifically, I want to be able
> to ascertain whether a link is down (404) or alive.
>
> A bare-bones example would be appreciated.
<?php
file_get_contents("http://google.com");
var_dump($http_response_header);
?>
Csaba Gabor from Vienna
Navigation:
[Reply to this message]
|