IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   PHP (https://www.ircforumlari.net/php/)
-   -   php ile domain (server) kontrolü yapmak (https://www.ircforumlari.net/php/640986-php-ile-domain-server-kontrolu-yapmak.html)

hAte 07 Kasım 2014 06:27

php ile domain (server) kontrolü yapmak
 
PHP- Kodu:

<?

function DomainCheck($domainName){
$startTime microtime(true);
$openDomain fsockopen ($domainName80$errno$errstr10);
$finishTime microtime(true);
$serverStatus 0;
# Control Structure
if (!$openDomain$serverStatus = -1
else {
fclose($openDomain);
$status = ($finishTime $startTime) * 1000;
$serverStatus floor($serverStatus);
}
return 
$serverStatus;
}

$domainName "
Bu forumdaki linkleri ve resimleri görebilmek için en az 25 mesajınız olması gerekir.
style="color: #007700">;
$serverStatus DomainCheck($domainName);


if (
$serverStatus != -1) {
echo 
"server a şu anda ulaşılamıyor.site yok" ;
} else {
echo 
"Servera ulaşılabiliyor.Site var" ;


?>



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 19:23.

Powered by vBulletin® Version 3.8.8 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2024 IRCForumlari.Net