Файл: world-faces.ru/world-faces.ru/sys/inc/ipua.php
Строк: 7
<?php
include_once H.'sys/fnc/esc.php';
$ip=false;
if(isset($_SERVER['HTTP_X_FORWARDED_FOR']) && $_SERVER['HTTP_X_FORWARDED_FOR']!='127.0.0.1' && ereg("^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$",$_SERVER['HTTP_X_FORWARDED_FOR'])){
$ip2['xff']=$_SERVER['HTTP_X_FORWARDED_FOR'];
$ipa[] = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
if(isset($_SERVER['HTTP_CLIENT_IP']) && $_SERVER['HTTP_CLIENT_IP']!='127.0.0.1' && ereg("^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$",$_SERVER['HTTP_CLIENT_IP'])){
$ip2['cl']=$_SERVER['HTTP_CLIENT_IP'];
$ipa[] = $_SERVER['HTTP_CLIENT_IP'];
}
if(isset($_SERVER['REMOTE_ADDR']) && ereg("^([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3}).([0-9]{1,3})$",$_SERVER['REMOTE_ADDR'])){
$ip2['add']=$_SERVER['REMOTE_ADDR'];
$ipa[] = $_SERVER['REMOTE_ADDR'];
}
$ip=$ipa[0];
$iplong =ip2long($ip);
if(isset($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'])){
$ua='Opera Mini ('.stripcslashes(htmlspecialchars(strtok($_SERVER['HTTP_X_OPERAMINI_PHONE_UA'], '/'))).')';
}else if(isset($_SERVER['HTTP_USER_AGENT'])){
$ua=stripcslashes(htmlspecialchars($_SERVER['HTTP_USER_AGENT']));
}else{
$ua = false;
}
$ua=strtok($ua, '/');
?>