Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (430)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
How to get users’ IP Address with PHP
Useful PHP Code Snippets for Developers - How to get users’ IP Address with PHP
✍: Guest
function getRealIpAddr()
{
if (!empty($_SERVER['HTTP_CLIENT_IP'])) //check ip from share internet
{
$ip=$_SERVER['HTTP_CLIENT_IP'];
}
elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) //to check ip is pass from proxy
{
$ip=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
else
{
$ip=$_SERVER['REMOTE_ADDR'];
}
return $ip;
}
2015-06-19, 1568🔥, 0💬
Popular Posts:
How to add slide numbers and copyright in the footer area? You can add slide numbers, copyright text...
How to open firewall for the FTP command-line tool on Windows for data connections in active mode? I...
What are those search options provided on Library Genesis? Library Genesis provides 3 types of searc...
Where to find answers to frequently asked questions on Mozilla Firefox? I want to know how to know h...
How to create a command button to run my macro in slide show in PowerPoint? I have created a macro t...