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, ∼2064🔥, 0💬
Popular Posts:
How to open a Web Archive (.mht or .mhtml) file correctly in Firefox browser? I converted a word doc...
How to save a presentation with macros in the PowerPoint Macro-Enabled Presentation (*.pptm) file fo...
How to update TOC (Table Of Content) for a FrameMaker book? I have make changes in some chapters. Yo...
How to find all section breaks in a Microsoft Word document? I want to review them. Section breaks i...
Where to find answers to frequently asked questions about Adobe Flash Player? I want to understand m...