473,407 Members | 2,312 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,407 software developers and data experts.

ip address question (trouble with remote_addr)

Hi.
I have a problem when I use the $_SERVER['remote_addr'].
I'm testing a script, and the strange thing is that remote_addr returns an
ip-address only sometimes, and not always. Why can that be?
Are there any other (better) methods of getting the ip-address?

Ojorus
Jun 2 '06 #1
4 2128
ojorus wrote:
Hi.
I have a problem when I use the $_SERVER['remote_addr'].
I'm testing a script, and the strange thing is that remote_addr returns an
ip-address only sometimes, and not always. Why can that be?
Are there any other (better) methods of getting the ip-address?

Ojorus


Hi Ojorus,

That is suprising because that IP is used to send the response to.
Can you reproduce the empty $_SERVER['remote_addr'] yourself?

What setup are you using? PHP-version/OS/webserver?

Regards,
Erwin Moller
Jun 2 '06 #2
Erwin Moller wrote:
ojorus wrote:
Hi.
I have a problem when I use the $_SERVER['remote_addr'].
I'm testing a script, and the strange thing is that remote_addr returns
an ip-address only sometimes, and not always. Why can that be?
Are there any other (better) methods of getting the ip-address?

Ojorus
Hi Ojorus,

That is suprising because that IP is used to send the response to.
Can you reproduce the empty $_SERVER['remote_addr'] yourself?

What setup are you using? PHP-version/OS/webserver?


One addition: according to
http://koivi.com/apache-iis-php-server-array.php
both IIS and Apache support remote_adres.

Regards,
Erwin Moller


Jun 2 '06 #3
Hi!
The server where the php-script is located is Apache/1.3.33. (Shared host)
X-Powered-By: PHP/5.0.4

When I test the script locally on my apache-installation, everything works
fine. But when I upload it to the server I use, the strange error occour;
the IP-address is only returned from time to time, and not always.
It also seems that when the server is quite busy, the problem increases.

I don't have a clue how to solve this...

Ojorus

"Erwin Moller"
<si******************************************@spam yourself.com> skrev i
melding news:44***********************@news.xs4all.nl...
ojorus wrote:
Hi.
I have a problem when I use the $_SERVER['remote_addr'].
I'm testing a script, and the strange thing is that remote_addr returns
an
ip-address only sometimes, and not always. Why can that be?
Are there any other (better) methods of getting the ip-address?

Ojorus


Hi Ojorus,

That is suprising because that IP is used to send the response to.
Can you reproduce the empty $_SERVER['remote_addr'] yourself?

What setup are you using? PHP-version/OS/webserver?

Regards,
Erwin Moller

Jun 2 '06 #4
>I have a problem when I use the $_SERVER['remote_addr'].
I'm testing a script, and the strange thing is that remote_addr returns an
ip-address only sometimes, and not always. Why can that be?
Are there any other (better) methods of getting the ip-address?


Some IP addresses have no reverse DNS. If it's intermittent for
the SAME IP address on different hits, maybe you're having trouble
with DNS lookups.

Gordon L. Burditt
Jun 2 '06 #5

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

Similar topics

1
by: David | last post by:
I know that identifying the user IP address with HTTP_SERVER_VARS; is reliant on the browser agent but I have stumpled upon the following code which I have tried to understand but failed! ...
5
by: Sachin Singhal | last post by:
Hi All, I am in a bit of fix. In one of my setup, the server REMOTE_ADDR(url = Request.ServerVariables("REMOTE_ADDR")) does not work, itgives a IP address but the wrong one. It does not give the...
14
by: pcchong | last post by:
I use a free database-driven ASP guestbook. I want to add a IP address blocking filter to it( just to block one particular guest). What is the easiest way to do so? Thanks. pcchong
5
by: Greg Smith | last post by:
I have been using the following to get the client IP address: Request.ServerVariables All of a sudden it has started returning 127.0.0.1 all the time. Does anybody have any idea why this...
1
by: danknauf | last post by:
I have a webserver which is behaving strangely. The server is a fresh copy of Windows 2003 running IIS with default options + Active Server Pages installed. The server is connected to a Linksys...
1
by: zhang | last post by:
what's the problem?? Remote_Addr = "hotmail.com" sFrom = "<makefriend8@" & Remote_Addr + ">" Dim oConnection As New TcpClient() Try oConnection.SendTimeout = 3000 ...
0
by: eddiefisher41 | last post by:
Hi guys. Im having a little trouble with one of my phyon cgi scripts. Basically i need to a function that runs on the server size as a python cgi script but returns the IP address of the web...
15
by: Mike | last post by:
Hi ASP Gurus, Please help me solving my problem. I am trying to get the clients IP address but I am not able to do it successfully. I have tried: Request.ServerVariables("http_user_agent")...
0
by: Xionbox | last post by:
Hello everybody, The error I have seems very easy to solve, but for some odd reason I can't seem to solve it. Anyways, here's my "setup". I created a server running on localhost:1200 (telnet...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.