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, 1796🔥, 0💬
Popular Posts:
How to remove Microsoft Teams form my Windows 7 system? I don't want it any more. You can remove Mic...
What are Control Connection and Data Connection used in FTP protocol? FTP protocol uses two independ...
How to unzip a PowerPoint .pptx file? According to Microsoft documentation, a .pptx file is really a...
Why am I not seeing the "Call Forwarding" option on Skype for Business on Windows? You don't see the...
Where to find answers to frequently asked questions on Microsoft Teams? Here is a list of frequently...