homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Check if user is located at 192.168.*.* in javascript
I need to see if the user is at the office or at home.

10+ Year Member

Msg#: 257 posted 4:26 am on Jan 11, 2003 (gmt 0)

Hi, I am doing a portal site in which I dispay an Icon based on whether the user is at work or at home. If they are at work the Icon will show and will open an aplication if they are not at work it will just redirect them. Can anyone help me on this.



WebmasterWorld Senior Member 10+ Year Member

Msg#: 257 posted 4:36 am on Jan 11, 2003 (gmt 0)

Are you trying to determine whether the person is on the same local network as the server, or trying to determine what IP their machine thinks it has? The first should be done on the server, not in javascript, and the second is pretty much meaningless.


10+ Year Member

Msg#: 257 posted 4:50 pm on Jan 11, 2003 (gmt 0)

I concur with dingman.

If you want to enable your users to access corporate information *only* from within the lan, then checking of location should only be done on the server iself and never ever at all be done in the clients browser!

If you place your check on the client browser you'll get hacked within 5 seconds or less! It's so simple to do that that it's ridiculous:
1) save the complete page with all files to the HD (Mozilla will do this for you)
2) modify the checking javascript code so that it thinks it's always on the LAN
3) modify clickable links to be absolute links
4) load the page in the brower and you are inside!

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved