View Full Version : Is there a way to get ones IP and host locally?

08-08-2006, 05:36 PM
I am putting together a local info script for a user to see all their browsers vital's in a little window, though I am not able to get IP and host to work right, is this not possible or am I using the wrong commands/syntax? I was using a document.write with similar to ('..IP: '+%%IP%%+'..Host info: '+%%HOST%%+'.. .') So, far all I have managed to do is get it to display the literal var I have been trying to grab this info from. If theres a way plz let me know how, thx!

Also is there a way to tell Windows XP from Just Windows? I have tried XP, WinXP, Windows XP, none have worked out so far...

08-08-2006, 05:48 PM
no, getting IP using javascript-clientside is impossible, to accomplish this task get IIS/PWS and use ASP with Javascript, because IP is what server is able to get not client

so I am sorry but the answer to this question is no, only a server-side script and programs can get your Internet protocol(such as ASP, PHP, PERL, and JSP)

so hope it helps :D

08-08-2006, 08:07 PM
Here's an old function. I don't think it works on IE and probably won't fly in most other browsers based on the security config.

function test(){

08-08-2006, 09:30 PM
looks like java to me, anyways, like i said, use a server-side script :D

08-08-2006, 11:27 PM
Yea it figures, thanks for the help.

08-09-2006, 03:19 AM
That is actually Javascript that is calling Java to get the IP address.