473,216 Members | 2,069 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,216 software developers and data experts.

How to get client IP ?

Hello Everybody,

I try to use script to get client IP

<%
dim IPAddr
IPAddr = Request.ServerVariables("remote_addr")
Response.Write("Your IP Address is " & IPAddr)
%>

but script return IP of Web site, not CLIENT and not null value!

My site is hosted on W2003 server SP1, IIS, ISA

I'm only using ASP no ASP.NET

Regards,
David

May 26 '06 #1
11 4928
David Velazco wrote:
Hello Everybody,

I try to use script to get client IP

<%
dim IPAddr
IPAddr = Request.ServerVariables("remote_addr")
Response.Write("Your IP Address is " & IPAddr)
%>

but script return IP of Web site, not CLIENT and not null value!

My site is hosted on W2003 server SP1, IIS, ISA

Have the user enter it into a form field. ;-)

There is no guaranteed way to do it.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
May 26 '06 #2
David Velazco wrote on 26 mei 2006 in
microsoft.public.inetserver.asp.general:
Hello Everybody,

I try to use script to get client IP

<%
dim IPAddr
IPAddr = Request.ServerVariables("remote_addr")
Response.Write("Your IP Address is " & IPAddr)
%>

but script return IP of Web site, not CLIENT and not null value!
This is not true.

The IP of the user's own pc or router or proxy is shown.

====================

This is the same question you, David, asked and I answered on:

Subject: Re: I want to get the number IP
Date: Mon, 22 May 2006 20:22:27 +0200
Newsgroup: microsoft.public.inetserver.asp.general
My site is hosted on W2003 server SP1, IIS, ISA

I'm only using ASP no ASP.NET


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 26 '06 #3
Hello Everybody,

My machine server give me a number IP but it's my server ISA that is my
firewall.
I wish I have the number IP of client.
How do i make it ?

I use this but it give me the same number.

<%
dim IPAddr
IPAddr = Request.ServerVariables("remote_addr")
Response.Write("Your IP Address is " & IPAddr)
IPAddr = Request.ServerVariables("remote_host")
Response.Write("Your IP Address is " & IPAddr)
%>

Regards,
David


"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
David Velazco wrote on 26 mei 2006 in
microsoft.public.inetserver.asp.general:
Hello Everybody,

I try to use script to get client IP

<%
dim IPAddr
IPAddr = Request.ServerVariables("remote_addr")
Response.Write("Your IP Address is " & IPAddr)
%>

but script return IP of Web site, not CLIENT and not null value!


This is not true.

The IP of the user's own pc or router or proxy is shown.

====================

This is the same question you, David, asked and I answered on:

Subject: Re: I want to get the number IP
Date: Mon, 22 May 2006 20:22:27 +0200
Newsgroup: microsoft.public.inetserver.asp.general
My site is hosted on W2003 server SP1, IIS, ISA

I'm only using ASP no ASP.NET


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

May 26 '06 #4
This is everything you will be able to retrieve from the server
variables if you run this script and cant find what your looking for
then its un ava to you for some reason.

http://www.4guysfromrolla.com/webtech/092298-3.shtml

Hope this helps.

Earl Robb
www.jhdesigninc.com

May 26 '06 #5

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
David Velazco wrote on 26 mei 2006 in
microsoft.public.inetserver.asp.general:
Hello Everybody,

I try to use script to get client IP

<%
dim IPAddr
IPAddr = Request.ServerVariables("remote_addr")
Response.Write("Your IP Address is " & IPAddr)
%>

but script return IP of Web site, not CLIENT and not null value!
This is not true.

The IP of the user's own pc or router or proxy is shown.

Not if the web server is behind a ISA server, then it will show the ISA
server as the client


====================

This is the same question you, David, asked and I answered on:

Subject: Re: I want to get the number IP
Date: Mon, 22 May 2006 20:22:27 +0200
Newsgroup: microsoft.public.inetserver.asp.general
My site is hosted on W2003 server SP1, IIS, ISA

I'm only using ASP no ASP.NET


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

May 27 '06 #6
Slim wrote on 27 mei 2006 in microsoft.public.inetserver.asp.general:
The IP of the user's own pc or router or proxy is shown.

Not if the web server is behind a ISA server, then it will show the ISA
server as the client


Why would you do that? Is hiding a server a usefull idea?

I suppose the OP would have to use another server as an intermediate, but I
would have to sleep on it getting a solution.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 27 '06 #7

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
Slim wrote on 27 mei 2006 in microsoft.public.inetserver.asp.general:
The IP of the user's own pc or router or proxy is shown.

Not if the web server is behind a ISA server, then it will show the ISA
server as the client


Why would you do that? Is hiding a server a usefull idea?


ISA is very useful if you are hosting many web sites on one IP for example.
you can send requests to the web site based on the domain name entered.

Yes you can do this by using hostheaders in IIS, but that causes other
problems like connecting with visual studio though FrontPage extensions for
example
depending on what David wants to know the clients ip for, maybe ISA can do
the job for him.
ISA gives a log of client ip's, it can also block certain ip's, but if he
needs it for his asp code, hen I don't have a answer

I suppose the OP would have to use another server as an intermediate, but
I
would have to sleep on it getting a solution.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

May 27 '06 #8
> Yes you can do this by using hostheaders in IIS, but that causes other
problems like connecting with visual studio though FrontPage extensions
for example
ummm, no

I can do that no problem and my colocated 2003 Server is using host
headers...
"Slim" <me@here.com> wrote in message
news:Ov**************@TK2MSFTNGP03.phx.gbl...
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
Slim wrote on 27 mei 2006 in microsoft.public.inetserver.asp.general:
The IP of the user's own pc or router or proxy is shown.
Not if the web server is behind a ISA server, then it will show the ISA
server as the client


Why would you do that? Is hiding a server a usefull idea?


ISA is very useful if you are hosting many web sites on one IP for
example. you can send requests to the web site based on the domain name
entered.

Yes you can do this by using hostheaders in IIS, but that causes other
problems like connecting with visual studio though FrontPage extensions
for example
depending on what David wants to know the clients ip for, maybe ISA can do
the job for him.
ISA gives a log of client ip's, it can also block certain ip's, but if he
needs it for his asp code, hen I don't have a answer

I suppose the OP would have to use another server as an intermediate, but
I
would have to sleep on it getting a solution.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)


May 27 '06 #9

"Kyle Peterson" <ky*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Yes you can do this by using hostheaders in IIS, but that causes other
problems like connecting with visual studio though FrontPage extensions
for example
ummm, no

I can do that no problem and my colocated 2003 Server is using host
headers...

Try using the server admin with host headers



"Slim" <me@here.com> wrote in message
news:Ov**************@TK2MSFTNGP03.phx.gbl...

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
Slim wrote on 27 mei 2006 in microsoft.public.inetserver.asp.general:

> The IP of the user's own pc or router or proxy is shown.
Not if the web server is behind a ISA server, then it will show the ISA
server as the client
Why would you do that? Is hiding a server a usefull idea?


ISA is very useful if you are hosting many web sites on one IP for
example. you can send requests to the web site based on the domain name
entered.

Yes you can do this by using hostheaders in IIS, but that causes other
problems like connecting with visual studio though FrontPage extensions
for example
depending on what David wants to know the clients ip for, maybe ISA can
do the job for him.
ISA gives a log of client ip's, it can also block certain ip's, but if he
needs it for his asp code, hen I don't have a answer

I suppose the OP would have to use another server as an intermediate,
but I
would have to sleep on it getting a solution.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)



May 27 '06 #10
It all works fine for me, you just need to know what your doing.


"Slim" <me@here.com> wrote in message
news:On**************@TK2MSFTNGP05.phx.gbl...

"Kyle Peterson" <ky*****@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
Yes you can do this by using hostheaders in IIS, but that causes other
problems like connecting with visual studio though FrontPage extensions
for example


ummm, no

I can do that no problem and my colocated 2003 Server is using host
headers...

Try using the server admin with host headers



"Slim" <me@here.com> wrote in message
news:Ov**************@TK2MSFTNGP03.phx.gbl...

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
Slim wrote on 27 mei 2006 in microsoft.public.inetserver.asp.general:

>> The IP of the user's own pc or router or proxy is shown.
>
>
> Not if the web server is behind a ISA server, then it will show the
> ISA
> server as the client
>

Why would you do that? Is hiding a server a usefull idea?

ISA is very useful if you are hosting many web sites on one IP for
example. you can send requests to the web site based on the domain name
entered.

Yes you can do this by using hostheaders in IIS, but that causes other
problems like connecting with visual studio though FrontPage extensions
for example
depending on what David wants to know the clients ip for, maybe ISA can
do the job for him.
ISA gives a log of client ip's, it can also block certain ip's, but if
he needs it for his asp code, hen I don't have a answer
I suppose the OP would have to use another server as an intermediate,
but I
would have to sleep on it getting a solution.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)



May 27 '06 #11
David Velazco wrote:
I wish I have the number IP of client.
How do i make it ?


You can wish all you want, but realizing that wish is an actual
impossibility. The notion of "IP Address" is meaningless when the client is
behind a proxy or NAT. There are probably hundreds of thousands of computers
with [192.168.0.2] or [10.0.0.2].
--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
May 28 '06 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Michael Rybak | last post by:
hi, everyone. I'm writing a 2-players game that should support network mode. I'm now testing it on 1 PC since I don't have 2. I directly use sockets, and both client and server do...
18
by: cjl | last post by:
Hey all: I know that it is silly in the age of Google to 'lose' something on the internet, but I recently checked out a project that had implemented a database with a subset of SQL in pure...
11
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each...
6
by: Ken Allen | last post by:
I am relatively new to .Net and C#, but I hav ebeen programing in other languages and done some COM work for a number of years. I am attempting to understand how to map an older program...
4
by: rs | last post by:
how I the client tell the server that the socket is closed? or this there an even that informs the server that the clients socket is close? Oh, I am using vb.net 2003 Thanks
8
by: Ankit Aneja | last post by:
i am doing here some some socket-client work in C# windows service it is working fine for multiple clients now i want to limit these multiple clients to 25 for example i want that when service...
2
by: J Huntley Palmer | last post by:
I am having a horrific time integrating uw-imap's c-client for imap support in php. The problem is a whole bunch of "Text relocation remains referenced against symbol" errors during linking....
0
by: khu84 | last post by:
Here is client server very simple code, seems to work with telnet but with with web client code gives blank output. Following is the server code:- <?php function...
2
by: nsaffary | last post by:
hi I hava a client/server program that run correctly when i run it in one computer(local) but when I run client on a one computer and run server run on another, connection does not stablish.(I set...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.