rendered paste body<?php ini_set('display_errors', 0); ?>
<html>
<head>
<meta http-equiv="refresh" content="60">
<title>PING SERVEURS</title>
<style>
A{color:blue; text-decoration:none}
A:hover{color:red}
</style>
</head>
<body>
<!-- Par Kuji -->
<div align="center">
<font face="Arial">
<table width="500" border=1 cellpadding=3 cellspacing=0>
<tr bgcolor=#FFFF99>
<td width="400"><b>Serveurs</b></td>
<td width="100"><b>Réponse</b></td>
<?
$nom[0]="Yahoo";
$adresse[0]="www.yahoo.com";
$port[0]=80;
$nom[1]="Altavista";
$adresse[1]="www.altavista.com";
$port[1]=80;
$nom[2]="Google";
$adresse[2]="www.google.fr";
$port[2]=80;
$nom[3]="FTP Microsoft";
$adresse[3]="ftp.microsoft.com";
$port[3]=21;
$nom[4]="Le Web Facile";
$adresse[4]="www.lewebfacile.net";
$port[4]=80;
$nom[5]="Voila";
$adresse[5]="www.voila.fr";
$port[5]=80;
$nom[6]="Wanadoo";
$adresse[6]="www.wanadoo.fr";
$port[6]=80;
$nom[7]="PHP Net";
$adresse[7]="www.php.net";
$port[7]=80;
$nom[8]="shoutcast";
$adresse[8]="stream4.gshebergement.net";
$port[8]=11002;
$nom[9]="shoutcastpingpas";
$adresse[9]="stream4.canaltv.org ";
$port[9]=5050;
$i=0;
for($i=0;$i<10;$i++)
{
if ($port[$i]==80) {$prefixe="http";}
else if ($port[$i]==21) {$prefixe="ftp";}
else {$prefixe="http";}
echo "<tr>";
echo "<td width=\"500\">";
echo "<a href=\"" . $prefixe . "://" . $adresse[$i] . "\" target=\"_blank\"".">" . $nom[$i] ."</a> ";
echo "</td>";
echo "<td width=\"100\">";
$reponse = fsockopen($adresse[$i], $port[$i]);
if (!empty($reponse)) {
echo "<font color=green><b>OUI</b></font></td></tr>";}else{ echo '<font color=red><b>NON</b></font></td></tr>';}
}
?>
</table>
</font>
</div>
</body>
</html>