- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
<head><title>Статистика ретрекеров сети nextOne</title></head>
<meta http-equiv="refresh" content="5;URL=index.php">
<?php
require_once("config.php");
error_reporting(∼E_ALL);
//Торрент трекер on\off
//Сервер 1
function check_server1($serverip1, $port1)
{
if($fp1=fsockopen($serverip1, $port1, $ERROR_NO, $ERROR_STR,(float)2))
{
return true;
fclose($fp1);
} else {
return false;
}
}
//Сервер 2
function check_server2($serverip2, $port2)
{
if($fp2=fsockopen($serverip2, $port2, $ERROR_NO, $ERROR_STR,(float)2))
{
return true;
fclose($fp2);
} else {
return false;
}
}
//Сервер 3
function check_server3($serverip3, $port3)
{
if($fp3=fsockopen($serverip3, $port3, $ERROR_NO, $ERROR_STR,(float)2))
{
return true;
fclose($fp3);
} else {
return false;
}
}
//Сервер 4
function check_server4($serverip4, $port4)
{
if($fp4=fsockopen($serverip4, $port4, $ERROR_NO, $ERROR_STR,(float)2))
{
return true;
fclose($fp4);
} else {
return false;
}
}
if(check_server1($serverip1, $port1)===true)
{
echo "<table border=0><tr><td>",$serverip1,":",$port1,"</td>","<td><b><font color=#2E8B57>online</font></b><br></td></tr>";
} else {
echo "<table border=0><tr><td>",$serverip1,":",$port1,"</td>","<td><b><font color=red>offline</font></b><br></td></tr>";
}
if(check_server2($serverip2, $port2)===true)
{
echo "<tr><td>",$severip2,":",$port2,"</td><td>","<b><font color=#2E8B57>online</font></b><br></td></tr>";
} else {
echo "<tr><td>",$serverip2,":",$port2,"</td><td>","<b><font color=red>offline</font></b><br></td></tr>";
}
if(check_server3($serverip3, $port3)===true)
{
echo "<tr><td>",$serverip3,":",$port3,"</td><td>","<b><font color=#2E8B57>online</font></b><br></td></tr>";
} else {
echo "<tr><td>",$serverip3,":",$port3,"</td><td>","<b><font color=red>offline</font></b><br></td></tr>";
}
if(check_server4($serverip4, $port4)===true)
{
echo "<tr><td>",$serverip4,":",$port4,"</td><td>","<b><font color=#2E8B57>online</font></b></td></tr></table>";
} else {
echo "<tr><td>",$serverip4,":",$port4,"</td><td>","<b><font color=red>offline</font></b><br></td></tr></table>>";
}a
?>
Цитата: "Я просо незнаю о работе с операторами array, а известный мне define тут не подходит "