How would you get an IP Address using VBScript? Thanks
Printable View
How would you get an IP Address using VBScript? Thanks
Request.Servervariables("REMOTE_HOST")
This is server-side
greetings,
im 18 and work at apc, and im in charge of the lan here at one of the buildings and also head of the web department. is there a way using vbscript to get the ip address a computer when the browser is loaded? that way all the clients that go to a link.. example..
http://intranet/network/ip_used
that way it will write the ip address of the computer to a file so that a program that i made will be able to search through that text file and return the status of all the ipaddress and see which ones are used. the program is called Verify IP and is loacated here...
www.geocities.com/mountainpics/downloads
thanks so much. all i need is the code to get the ip address when the browser is loaded up. thanks!
im sorry, but the download is unavaiable... i cannot seem to upload the cab files...
And this didn't work?Quote:
Originally posted by CreoN
Request.Servervariables("REMOTE_HOST")
This is server-side
it throws up an error at reguest. i using the vbscript for client side.
Yes, I would hope that you couldn't get it client-side for the reasons that Josh pointed out. My machines IP address is not its broadcast address. But... try this.
And forgive me, I never use VBScript for client-side scripting, so you will have to translate from JavaScript to VBScript.
Code:<html>
<head></head>
<body>
<script language='JavaScript'>
var clientIP = <%=Request.ServerVariables("REMOTE_ADDR")%>;
</script>
</body>
</html>
Thanks.