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, ∼2015🔥, 0💬
Popular Posts:
Where to find answers to frequently asked questions on installing and using Mozilla Firefox 2.0? Her...
How to download and install SoapUI on Windows systems? Here are the steps to download and install So...
How to convert a Word document into a filtered Web page? I have a nice Word document and want to pub...
How to unzip a Word Document .docx file? According to Microsoft documentation, a .docx file is reall...
Where to find answers to frequently asked questions about Microsoft Office 365? Here is a collection...