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, ∼2065🔥, 0💬
Popular Posts:
Where to find answers to frequently asked questions on FTP (File Transfer Protocol and related tools...
How to download Google Chrome 31? I heard it has some really nice features for Web developers. If yo...
Why I am getting the "run or save ChromeSetup.exe" pop up box when trying to install Google Chrome 3...
Why I am getting the "FTP over TLS is not enabled, users cannot securely log in" waring on my FileZi...
How to log in to Microsoft Teams with a Web browser? I know that my company is using Microsoft Teams...