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, 1810🔥, 0💬
Popular Posts:
How to convert a Word document into an MHTML? I have a nice Word document and want to publish it on ...
What contents are stored in a Web Archive (.mht) file? When you convert a word document into a singl...
How to unzip a PowerPoint .pptx file? According to Microsoft documentation, a .pptx file is really a...
What are "AutoCorrect Actions" in Microsoft Word? Should I disable it? "AutoCorrect Actions" are add...
What are header and footer design options in Microsoft Word? I want to learn more about creating hea...