Loading...
удалено
________
посл. ред. 02.02.2019 в 11:12; всего 2 раз(а); by Angelino
Пока нормальный хайлайт не завезут, толку мало.
monobogdan, я бы авто коментирования в тег соде сделал с активацией на <php или иной другое значение или класс
бред. ты прям как депутат российской думы.
Архимед, Знаешь сказку про тролей? И я бЕЛАРУС
Angelino (02.02.2019 в 00:20)
Архимед, Знаешь сказку про тролей? И я бЕЛАРУС

хорош курить шерсть
Архимед, не офтопь
Angelino (01.02.2019 в 23:49)
Братья и Сёстры! Ну и конечно же наша добрая душой Администрация Зелёного Bymas-a
Предлагаю внести в правила изменения (п.5 и п.6) чтоб правила относились к BB-тегу [code] Если не вносить web code в данные теги то выдается придупреждение как офтоп

Так новичку будет стимул выучить html а так же его принцып и основы, и так же легче дедушкам и друзьям по коду!

Примите в виду данное предложение а так же жду поправки на счет предложения в коментариях и изминение предложения в шапке.
спс за внимание.

Откуда у вас такой бред в голове возник?
Тут никогда не банили за то, что не исспользовал тег code.
Похоже вы даже не понимаете что такое оффтоп и что код code не имеет к этому никакого значения.
Cezarionis, тебе нормально когда скидывают так код?

<?php

ini_set('sendmail_from', 'xiamsyamych@gmail.com' );
ini_set('SMTP', '141.8.192.151' );
ini_set('smtp_port', '25' );

$webservers = array('fiera.rtop', 'www.fiera.top');

function sendemail($subject,$message) {
$wrapmessage = wordwrap($message,70,"n",true);
$to = 'xiamsyamych@gmail.com';
$headers = 'From: fiera.top' . "rn" .
'Reply-To: fiera.top' . "rn" .
'X-Mailer: PHP/' . phpversion();

return mail($to, $subject, $wrapmessage, $headers);
}

function getresponse($url) {
$ch = curl_init();
if (!$ch) {
$subject = "Web Server Checking Script Error";
$message = "The web server checking script issued an error when it tried to process ".$url."rnCouldn't initialize a cURL handle";
sendemail($subject,$message);
die();
}

$ret = curl_setopt($ch, CURLOPT_URL, "http://".$url."/");
$ret = curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
$ret = curl_setopt($ch, CURLOPT_HEADER, true);
$ret = curl_setopt($ch, CURLOPT_NOBODY, true);
$ret = curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
$ret = curl_setopt($ch, CURLOPT_TIMEOUT, 30);

$ret = curl_exec($ch);

if (empty($ret)) {
$subject = "Web Server Checking Script Error";
$message = "The web server checking script issued an error when it tried to process ".$url."rncurl_error ".$ch;
sendemail($subject,$message);
curl_close($ch);
die();
} else {
$info = curl_getinfo($ch);
curl_close($ch);
if (empty($info['http_code'])) {
$subject = "Web Server Checking Script Error";
$message = "The web server checking script issued an error when it tried to process ".$url."rnNo HTTP code was returned";
sendemail($subject,$message);
die();
} else {
$http_codes = parse_ini_file("/server/path/to/http-response-codes.ini");

$result = $info['http_code'] . " " . $http_codes[$info['http_code']];
}

}
return $result;
}

foreach ($webservers as $webserver) {
$status = getresponse($webserver);
if (strstr($status, "200")) {
return None;
} else {
$timestamp = date("m/d/Y H:i:s a", time());
$error = $webserver." - ".$status." status error detected";
$message = "At - ".$timestamp." - a http response error was detected on ".$webserver.".rnInstead of a 200 OK response, the server returned ".$status."rnThis requires immediate attention!";
sendemail($error,$message);
}
}
?>

Накидал то что на ум пришло!
или сделать так

<?php

ini_set('sendmail_from', 'xiamsyamych@gmail.com' );
ini_set('SMTP', '141.8.192.151' );
ini_set('smtp_port', '25' );

$webservers = array('fiera.rtop', 'www.fiera.top');

function sendemail($subject,$message) {
$wrapmessage = wordwrap($message,70,"\n",true);
$to = 'xiamsyamych@gmail.com';
$headers = 'From: fiera.top' . "\r\n" .
'Reply-To: fiera.top' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

return mail($to, $subject, $wrapmessage, $headers);
}

function getresponse($url) {
$ch = curl_init();
if (!$ch) {
$subject = "Web Server Checking Script Error";
$message = "The web server checking script issued an error when it tried to process ".$url."\r\nCouldn't initialize a cURL handle";
sendemail($subject,$message);
die();
}

$ret = curl_setopt($ch, CURLOPT_URL, "http://".$url."/");
$ret = curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
$ret = curl_setopt($ch, CURLOPT_HEADER, true);
$ret = curl_setopt($ch, CURLOPT_NOBODY, true);
$ret = curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
$ret = curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
$ret = curl_setopt($ch, CURLOPT_TIMEOUT, 30);

$ret = curl_exec($ch);

if (empty($ret)) {
$subject = "Web Server Checking Script Error";
$message = "The web server checking script issued an error when it tried to process ".$url."\r\ncurl_error ".$ch;
sendemail($subject,$message);
curl_close($ch);
die();
} else {
$info = curl_getinfo($ch);
curl_close($ch);
if (empty($info['http_code'])) {
$subject = "Web Server Checking Script Error";
$message = "The web server checking script issued an error when it tried to process ".$url."\r\nNo HTTP code was returned";
sendemail($subject,$message);
die();
} else {
$http_codes = parse_ini_file("/server/path/to/http-response-codes.ini");

$result = $info['http_code'] . " " . $http_codes[$info['http_code']];
}

}
return $result;
}

foreach ($webservers as $webserver) {
$status = getresponse($webserver);
if (strstr($status, "200")) {
return None;
} else {
$timestamp = date("m/d/Y H:i:s a", time());
$error = $webserver." - ".$status." status error detected";
$message = "At - ".$timestamp." - a http response error was detected on ".$webserver.".\r\nInstead of a 200 OK response, the server returned ".$status."\r\nThis requires immediate attention!";
sendemail($error,$message);
}
}
?>

________
посл. ред. 02.02.2019 в 04:49; всего 1 раз(а); by Angelino
Angelino (02.02.2019 в 04:47)
Cezarionis, тебе нормально когда скидывают так код?


так если тебе не нормально, так попроси чтоб скинули в бб коде. а так это уже не твоё дело как скидывают.
Онлайн: 4
Время:
Gen. 0.1315
(c) Bym.Guru 2010-2025