Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (490)
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, ∼2203🔥, 0💬
Popular Posts:
How to convert a Word document into an MHTML? I have a nice Word document and want to publish it on ...
How to see the key exchange process in an SFTP connection with FileZilla FTP Client? If you are conn...
How to make my presentation beautiful by applying a built-in theme provided by Office PowerPoint 200...
Where are Microsoft Teams files located on my macOS computer? If you have Microsoft Teams desktop so...
How to start to troubleshoot my Actiontec GT784WNV Modem? I am not able to access Internet. If you a...