Home All Groups Group Topic Archive Search About

Website local/remote login

Author
6 Oct 2006 4:53 AM
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

Author
6 Oct 2006 5:28 AM
Michel Posseth [MCP]
Request.Servervariables("REMOTE_ADDR")

or

Request.UserHostAddress()


regards

Michel Posseth [MCP]





Show quoteHide quote
"Bonzol" <Bon***@hotmail.com> schreef in bericht
news:1160110393.461589.117110@i3g2000cwc.googlegroups.com...
> 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
>
Author
6 Oct 2006 5:32 AM
Spam Catcher
"Bonzol" <Bon***@hotmail.com> wrote in news:1160110393.461589.117110
@i3g2000cwc.googlegroups.com:

Show quoteHide quote
> 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.