Guest flying_dragon Posted March 30, 2006 Share Posted March 30, 2006 Hi All, First of all I would like to say sorry if I'm posting on a wrong forum, u c, Im working on my website, and i was wondering is there a (an html script or maybe javascript?) way to display user's ip when they are visiting my website?? can anyone help me? i also want to display today's date in my website? is it possible? thanks in advance guys.. Link to comment Share on other sites More sharing options...
scott100 Posted March 30, 2006 Share Posted March 30, 2006 For date and time you could use a javascript (it will display the date/time from users machine): http://www.w3schools.com/js/js_obj_date.aspI don't think javascript can access the user IP, you would have to use a ssl lik php or asp.asp: <% Response.Write(Request.ServerVariables("remote_addr"))%>php: <?php echo "User's IP address: " . $_SERVER["REMOTE_ADDR"]; ?> Link to comment Share on other sites More sharing options...
Jonas Posted March 30, 2006 Share Posted March 30, 2006 http://javascript.internet.com/user-details/ip-address.htmlUses SSI though, so it shouldn't be on javascript.internet.com really... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now