Return to Snippet

Revision: 31327
at September 3, 2010 01:16 by sandrews_06


Initial Code
function visitorIP()
{ 
	if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])){
		$TheIp=$_SERVER['HTTP_X_FORWARDED_FOR'];
	}else{
		$TheIp=$_SERVER['REMOTE_ADDR'];  
	} 

	return trim($TheIp);
}

Initial URL
http://www.devirtuoso.com

Initial Description

                                

Initial Title
Get Visitors IP Address

Initial Tags
php, ip

Initial Language
PHP