binhlailبن هليــل
14-08-2008, 11:56 PM
شرح مختصر للكشف عن الأي بي الخقيقي للعضو
Step 1.
In class_core.php ;
ابحث ;
function fetch_alt_ip()
{
$alt_ip = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['HTTP_CLIENT_IP']))
{
$alt_ip = $_SERVER['HTTP_CLIENT_IP'];
}
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3 }#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches))
{
// make sure we dont pick up an internal IP defined by RFC1918
foreach ($matches[0] AS $ip)
{
if (!preg_match("#^(10|172\.16|192\.168)\.#", $ip))
{
$alt_ip = $ip;
break;
}
}
}
else if (isset($_SERVER['HTTP_FROM']))
{
$alt_ip = $_SERVER['HTTP_FROM'];
}
return $alt_ip;
}
استبدله ;
// Paul M - detect real ip when proxy in use (if possible).
function fetch_alt_ip()
{
$alt_ip = '';
$ignoreprivate = false;
if ($_SERVER['HTTP_X_FORWARDED_FOR'] != '') $alt_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if ($_SERVER['HTTP_FROM'] != '') $alt_ip = $_SERVER['HTTP_FROM'];
else if ($_SERVER['HTTP_FORWARDED'] != '') $alt_ip = $_SERVER['HTTP_FORWARDED'];
else if ($_SERVER['HTTP_CLIENT_IP'] != '') $alt_ip = $_SERVER['HTTP_CLIENT_IP'];
if (preg_match("#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#", $alt_ip, $iplist))
{
$alt_ip = $iplist[0];
if ($ignoreprivate)
{
if (preg_match("#^(127|10|172\.(1[6-9]|2[0-9]|3[0-1])|192\.168|169\.254)\.#", $alt_ip)) $alt_ip = '';
}
}
return $alt_ip;
}
Step 2.
In class_core.php ;
ابحث ;
// fetch client IP address
$registry->ipaddress = $this->fetch_ip();
define('IPADDRESS', $registry->ipaddress);
// attempt to fetch IP address from behind proxies - useful, but don't rely on it...
$registry->alt_ip = $this->fetch_alt_ip();
define('ALT_IP', $registry->alt_ip);
استبدله ;
// Paul M - Fetch client IP address & Proxy server address if detected
$registry->ipaddress = $this->fetch_ip();
$registry->alt_ip = $this->fetch_alt_ip();
define('ALT_IP', $registry->ipaddress);
if ($registry->alt_ip == '')
{
define('PROXYIP', '');
define('IPADDRESS', $registry->ipaddress);
}
else
{
define('PROXYIP', $registry->ipaddress);
define('IPADDRESS', $registry->alt_ip);
}
Step 3.
In class_core.php ;
ابحث ;
// define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
استبدله ;
// Paul M - define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
Step 4.
ارفع px.gif الى /images/buttons folder.
Step 5.
ارفع المنتج المرفق مع الهاك
الشرح مع المرفقات
Step 1.
In class_core.php ;
ابحث ;
function fetch_alt_ip()
{
$alt_ip = $_SERVER['REMOTE_ADDR'];
if (isset($_SERVER['HTTP_CLIENT_IP']))
{
$alt_ip = $_SERVER['HTTP_CLIENT_IP'];
}
else if (isset($_SERVER['HTTP_X_FORWARDED_FOR']) AND preg_match_all('#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3 }#s', $_SERVER['HTTP_X_FORWARDED_FOR'], $matches))
{
// make sure we dont pick up an internal IP defined by RFC1918
foreach ($matches[0] AS $ip)
{
if (!preg_match("#^(10|172\.16|192\.168)\.#", $ip))
{
$alt_ip = $ip;
break;
}
}
}
else if (isset($_SERVER['HTTP_FROM']))
{
$alt_ip = $_SERVER['HTTP_FROM'];
}
return $alt_ip;
}
استبدله ;
// Paul M - detect real ip when proxy in use (if possible).
function fetch_alt_ip()
{
$alt_ip = '';
$ignoreprivate = false;
if ($_SERVER['HTTP_X_FORWARDED_FOR'] != '') $alt_ip = $_SERVER['HTTP_X_FORWARDED_FOR'];
else if ($_SERVER['HTTP_FROM'] != '') $alt_ip = $_SERVER['HTTP_FROM'];
else if ($_SERVER['HTTP_FORWARDED'] != '') $alt_ip = $_SERVER['HTTP_FORWARDED'];
else if ($_SERVER['HTTP_CLIENT_IP'] != '') $alt_ip = $_SERVER['HTTP_CLIENT_IP'];
if (preg_match("#\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}#", $alt_ip, $iplist))
{
$alt_ip = $iplist[0];
if ($ignoreprivate)
{
if (preg_match("#^(127|10|172\.(1[6-9]|2[0-9]|3[0-1])|192\.168|169\.254)\.#", $alt_ip)) $alt_ip = '';
}
}
return $alt_ip;
}
Step 2.
In class_core.php ;
ابحث ;
// fetch client IP address
$registry->ipaddress = $this->fetch_ip();
define('IPADDRESS', $registry->ipaddress);
// attempt to fetch IP address from behind proxies - useful, but don't rely on it...
$registry->alt_ip = $this->fetch_alt_ip();
define('ALT_IP', $registry->alt_ip);
استبدله ;
// Paul M - Fetch client IP address & Proxy server address if detected
$registry->ipaddress = $this->fetch_ip();
$registry->alt_ip = $this->fetch_alt_ip();
define('ALT_IP', $registry->ipaddress);
if ($registry->alt_ip == '')
{
define('PROXYIP', '');
define('IPADDRESS', $registry->ipaddress);
}
else
{
define('PROXYIP', $registry->ipaddress);
define('IPADDRESS', $registry->alt_ip);
}
Step 3.
In class_core.php ;
ابحث ;
// define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->alt_ip))); // this should *never* change during a session
استبدله ;
// Paul M - define session constants
define('SESSION_IDHASH', md5($_SERVER['HTTP_USER_AGENT'] . vB_Session::fetch_substr_ip($registry->ipaddress))); // this should *never* change during a session
Step 4.
ارفع px.gif الى /images/buttons folder.
Step 5.
ارفع المنتج المرفق مع الهاك
الشرح مع المرفقات