BlueTooth Posted September 8, 2006 Posted September 8, 2006 I am currently trying to find the PHP Code to add into my web template for the following: 1. Users Date 2. Users Time 3. Users IP Address 4. Users Remote IP Address Any assistance would be extremly grateful. Thank you. Quote
TCH-JimE Posted September 8, 2006 Posted September 8, 2006 I would suggest searching hotscripts or google for the above. JimE Quote
MikeJ Posted September 8, 2006 Posted September 8, 2006 You can get the users remote IP address using the $_SERVER['REMOTE_ADDR'] reserved variable (see PHP's reserved variables for more details). I'm not sure what the difference is you are referring to between "Users IP Address" and "Users Remote IP Address". If you are referring to the server address for one of them, that can be determined by $_SERVER['SERVER_ADDR']. Offhand I'm not aware of a way to determine the remote browser's timezone. Quote
TCH-Don Posted September 8, 2006 Posted September 8, 2006 Some of what you are looking for is server variables. For example to display the visitors IP address use $_SERVER['REMOTE_ADDR'] <?php echo $_SERVER['REMOTE_ADDR']; ?> you can see the other variables here PHP Reference: Predefined Variables form php freaks.com That should get you started. Quote
BlueTooth Posted September 9, 2006 Author Posted September 9, 2006 Great thank you very much for you help guys. I have now found what I am looking for and have it just about set up and ready for release Thanks again Quote
LATH Posted February 25, 2007 Posted February 25, 2007 ... Offhand I'm not aware of a way to determine the remote browser's timezone. I was looking around for tips on timezones for another reason...and it struck me to comment on this if this issue ever comes to someones mind again... Maybe it would be possible to collect the remote browser's timestamp and put it into a cookie...then read the cookie on the server. Quote
carbonize Posted February 28, 2007 Posted February 28, 2007 The only way to detect their timezone would be to use javascript to get their computers time and then compare it with the servers time and calculate the difference. Or use IP tables to determine their location from their IP. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.