• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Asp - Wan Ip

Admiral Michael

Michaelsoft Systems CEO
#1
Hey all,

I basically got this system script done the way I want (http://www.michaelsoft.gotdns.com/stats.asp) cept for the Server IP. Since the computer is behind a router it shows my LAN IP, which is the result of using Request.ServerVariables("LOCAL_ADDR").

Any Ideas how to grab the IP (in ASP, dont want to mix languages. It all I kno besides HTML and a little javascript) from a site like http://checkip.dyndns.org or if you have another idea how to get the IP.

Mike
 
#4
lad_in_brum said:
Try REMOTE_ADDR
Isn't that the client's IP?

In PHP I'd use $_SERVER['SERVER_NAME'], which displayes the name or IP used to reach the server (changes between LAN and WAN users). But I'm not sure what the corresponding variable in ASP is...

You could of course parse http://checkip.dyndns.org/ using ASP and get the IP that way, but it's very slow since you have to do this every time you get a page access.
 

Members online

No members online now.

Latest posts

Latest profile posts

Perris Calderon wrote on Electronic Punk's profile.
Ep, glad to see you come back and tidy up...did want to ask a one day favor, I want to enhance my resume , was hoping you could make me administrator for a day, if so, take me right off since I won't be here to do anything, and don't know the slightest about the board, but it would be nice putting "served administrator osnn", if can do, THANKS

Been running around Quora lately, luv it there https://tinyurl.com/ycpxl
Electronic Punk wrote on Perris Calderon's profile.
All good still mate?
Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,962
Messages
673,247
Members
89,017
Latest member
Seggar