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, ∼1977🔥, 0💬
Popular Posts:
How to join a team in Microsoft Teams? My manager told me we are using Microsoft Teams service. In o...
Where are Microsoft Teams files located on my macOS computer? If you have Microsoft Teams desktop so...
What is Web Companion that bundled FileZilla Client? Why Web Companion gets installed on my computer...
What are those search options provided on Library Genesis? Library Genesis provides 3 types of searc...
How do I tell what version of PowerPoint my computer is using? You can determine the version number ...