Цитата:
<?PHP
function getUserOnline($User, $Server, $Port = 7777) {
$Users = substr(file_get_contents('http://monitoring.sangta.ru/api.php?ip=' . $Server . '&port=' . $Port . '&s=3'),161,-3);
if(preg_match('/'.$User.'/', $Users, $Matches, PREG_OFFSET_CAPTURE)) {
preg_match('/score:\'(.+?)\'/',$Users, $Level, 0, $Matches[0][1]);
$im = @imagecreate (130, 20);
$background_color = imagecolorallocate ($im, 38, 38, 38);
$text_color = imagecolorallocate ($im, 0, 255, 0);
imagestring ($im, 3, 5, 3, 'OnLine Level: ' . $Level[1], $text_color);
} else {
$im = @imagecreate (58, 20);
$background_color = imagecolorallocate ($im, 38, 38, 38);
$text_color = imagecolorallocate ($im, 233, 14, 91);
imagestring ($im, 3, 5, 3, 'OffLine', $text_color);
}
header('Content-type: image/png');
imagepng ($im);
}
getUserOnline('Roman_Ripper','77.220.182.228');
?>
function getUserOnline($User, $Server, $Port = 7777) {
$Users = substr(file_get_contents('http://monitoring.sangta.ru/api.php?ip=' . $Server . '&port=' . $Port . '&s=3'),161,-3);
if(preg_match('/'.$User.'/', $Users, $Matches, PREG_OFFSET_CAPTURE)) {
preg_match('/score:\'(.+?)\'/',$Users, $Level, 0, $Matches[0][1]);
$im = @imagecreate (130, 20);
$background_color = imagecolorallocate ($im, 38, 38, 38);
$text_color = imagecolorallocate ($im, 0, 255, 0);
imagestring ($im, 3, 5, 3, 'OnLine Level: ' . $Level[1], $text_color);
} else {
$im = @imagecreate (58, 20);
$background_color = imagecolorallocate ($im, 38, 38, 38);
$text_color = imagecolorallocate ($im, 233, 14, 91);
imagestring ($im, 3, 5, 3, 'OffLine', $text_color);
}
header('Content-type: image/png');
imagepng ($im);
}
getUserOnline('Roman_Ripper','77.220.182.228');
?>
Мне нужно создать два поля для ввода, где бы ты вводил свои данные и выводился бы то, что вывелось бы с вышепоказанного скрипта.
Еще точнее могу сказать.
Сделать два поля, в первом поле, чтобы изменялось в Roman_Ripper'
А другое тут: ,'77.220.182.228