<?php
$domain = 'http://google.ru';
if(preg_match('/[^0-9a-z-_A-Z:/.]/is', $domain)!=0){
include("idna_convert.class.php");
$IDN = new idna_convert(array('idn_version' =----> '2008'));
$domain=$IDN->encode($domain);
}
$status=get_headers($domain);
if(in_array("HTTP/1.1 200 OK", $status) or in_array("HTTP/1.0 200 OK", $status)){
echo $domain.' - доступен';
}
?>
The result of this PHP script will list all the http header by which you can judge the accessibility of the site
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.