How do I get the country, state, city, latitude, longitude, ZIP code, and timezone in PHP from the IP address.
Now I guess My question here comes out of the hours I spent looking over the wed, for a free script I could maybe mod to fit my needs, or the many, many requests out there for a script like this..
Now as I said in my other thread I am a novice to php. So I am sure this question has been asked many times but in my search I only found it asked in a mail function.. I need to either include it to my signup script or have it input to the set db table..
I am not sure it the is the right start but it the only one I could find..these are the strings variables in my input array..
do I use sessions??? Really the question is list long can someone please point me in the right direction.
Thank You
Robert
MA WarGod
I believe if someone can think it, it can be programmed
Now I guess My question here comes out of the hours I spent looking over the wed, for a free script I could maybe mod to fit my needs, or the many, many requests out there for a script like this..
Now as I said in my other thread I am a novice to php. So I am sure this question has been asked many times but in my search I only found it asked in a mail function.. I need to either include it to my signup script or have it input to the set db table..
Code:
$xIp='';
$xIp= (!empty($_SERVER['REMOTE_ADDR']))?$_SERVER['REMOTE_ADDR'] :((!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ? $_SERVER['HTTP_X_FORWARDED_FOR']: @getenv('REMOTE_ADDR'));
if(isset($_SERVER['HTTP_CLIENT_IP']))
$xIp=$_SERVER['HTTP_CLIENT_IP'];
return htmlspecialchars($xIp,ENT_QUOTES);
}
Code:
$timezone
$county
$stateprovince
$city
$zip
$ziprec['latitude']
$ziprec['longitude']
do I use sessions??? Really the question is list long can someone please point me in the right direction.
Thank You
Robert
MA WarGod
I believe if someone can think it, it can be programmed