- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
//------------------ Функция определения реального IP --------------------//
{
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && preg_match("|^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$|", $_SERVER['HTTP_X_FORWARDED_FOR'])){
$ip = $_SERVER['HTTP_X_FORWARDED_FOR'];}
elseif(isset($_SERVER['HTTP_CLIENT_IP']) && preg_match("|^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$|", $_SERVER['HTTP_CLIENT_IP'])) {
$ip = $_SERVER['HTTP_CLIENT_IP'];}
else {$ip = preg_replace("|[^0-9.]|", "", $_SERVER['REMOTE_ADDR']);}
$ip=$ip;
}
//------------------ Функция определения реального браузера --------------------//
{
if (isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])) {$browsus = htmlspecialchars(stripslashes($_SERVER['HTTP_X_OPERAMINI_PHONE_UA']));}
elseif(isset($_SERVER['HTTP_USER_AGENT'])) {$browsus=htmlspecialchars(stripslashes($_SERVER['HTTP_USER_AGENT']));}
else {$browsus='Not_detected';}
$brow=preg_replace('|http://|i','', $browsus);
$brow=strtok($brow,'(');
$brow=strtok($brow,' ');
$brow=substr($brow,0,22);
$brow=$brow;
}