Website local/remote login

  • Thread starter Thread starter Bonzol
  • Start date Start date
B

Bonzol

vb.net 1.1 web application

Hello all,

I am just making a website,, and what I'm trying to do is..

if a user trys to view the site remotely,, like in Japan or something
they will get sent to a certain page,, but if a user views the site on
the local network to send them to a differnt page to the remote user.

Anyone got any suggestions on how to do this?

I was thinking I could just get the IP address of the user and if it
begins with 192.168 send them somewhere accordingly. But I cannot find
a way to get the IP address of someone who uses the site.

Any help would be greatly apprecaited

Thanx in advance
 
Request.Servervariables("REMOTE_ADDR")

or

Request.UserHostAddress()


regards

Michel Posseth [MCP]
 
vb.net 1.1 web application

Hello all,

I am just making a website,, and what I'm trying to do is..

if a user trys to view the site remotely,, like in Japan or something
they will get sent to a certain page,, but if a user views the site on
the local network to send them to a differnt page to the remote user.

Anyone got any suggestions on how to do this?

I was thinking I could just get the IP address of the user and if it
begins with 192.168 send them somewhere accordingly. But I cannot find
a way to get the IP address of someone who uses the site.


Yes, the IP address will do... you can retrieve the client IP via the
HTTP Headers:

http://www.quepublishing.com/articles/article.asp?p=28493&seqNum=4&rl=1

REMOTE_ADDR will give you the client IP.

However, if there are firewalls, etc between you and the client, the IP
may not be 100% correct.

If you need more accurate detection (i.e. geolocation based) there are
products and components out there which can tell you roughly where an IP
address is located.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top