|
nutballs
|
 |
« on: September 24, 2009, 03:51:44 PM » |
|
How is this possible?
I get that it can be supplied by user, and as such, spoofed. But... whats the point in it being blank? I always assumed it was coming from apache? And that apache was getting it from the packet. I guess that cant be true though now that I think about it, because every packet could technically have a different IP on a multiplexed network or whatever its called.
So, any way to get the user's IP address when a $_SERVER['REMOTE_ADDR'] is blank? Like the packet return address?
|
|
|
|
|
Logged
|
|
|
|
|
perkiset
|
 |
« Reply #1 on: September 24, 2009, 04:03:56 PM » |
|
I've never seen that... is this a packet from (somewhere out there)? From you? What's the code look like?
|
|
|
|
|
Logged
|
It's the things you learn after you know it all that really count. -John Wooden
|
|
|
|
nutballs
|
 |
« Reply #2 on: September 24, 2009, 04:09:18 PM » |
|
its just people hitting my websites. I get blank $_SERVER['REMOTE_ADDR'] all day long maybe 100 a day. I am trying this to see if it remedies it: function getIpAddress() { return (empty($_SERVER['HTTP_CLIENT_IP'])?(empty($_SERVER['HTTP_X_FORWARDED_FOR'])? $_SERVER['REMOTE_ADDR']:$_SERVER['HTTP_X_FORWARDED_FOR']):$_SERVER['HTTP_CLIENT_IP']); }
|
|
|
|
|
Logged
|
|
|
|
|
perkiset
|
 |
« Reply #3 on: September 24, 2009, 04:27:36 PM » |
|
Hmmmm... I'll be really interested to see if that bears fruit. I have not used this myself, but you might play with the php wrapper and the stdin: http://us2.php.net/manual/en/wrappers.php.php... it's an alternate way of getting the information being passed into (this) php instance.
|
|
|
|
|
Logged
|
It's the things you learn after you know it all that really count. -John Wooden
|
|
|
|
nutballs
|
 |
« Reply #4 on: September 24, 2009, 04:44:58 PM » |
|
bah didnt fix it. I just got one with a blank again.
no ref and a user agent of Java/1.6.0_07 though, the agent is usually normal browser strings.
i dont get it. I wonder, could it be IPcop?
|
|
|
|
|
Logged
|
|
|
|
|
perkiset
|
 |
« Reply #5 on: September 24, 2009, 04:55:56 PM » |
|
I don't have that problem behind IP Cop ... I did when I was using Apache itself to proxy backwards into a rendering array, but never from IPCop.
This is bugging me, so I googled a bit and can find some discussion on it, but no answers at all. Some interesting tidbits though - is this in windows or nix? I don't know how to check, but could it be an incorrect interpretation of an IPv6 thang?
If you run your function and don't get any $ip, perhaps you should iterate through getHeaders and dump everything about the packet you see so that we might be able to get a feel for what's going on.
|
|
|
|
|
Logged
|
It's the things you learn after you know it all that really count. -John Wooden
|
|
|
|
Bompa
|
 |
« Reply #6 on: September 24, 2009, 04:58:21 PM » |
|
its just people hitting my websites. I get blank $_SERVER['REMOTE_ADDR'] all day long maybe 100 a day.
Something wrong with that server, imo.
|
|
|
|
|
Logged
|
Do You Know?
|
|
|
|
nutballs
|
 |
« Reply #7 on: September 24, 2009, 05:12:51 PM » |
|
these are remote nodes, phoning home with info about the surfer. They are all linux, assorted flavors. actually though, that just made me wonder if it is only 1 of the remotes???
hmmm gotta go check that.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
perkiset
|
 |
« Reply #9 on: September 24, 2009, 05:31:59 PM » |
|
I found the same post... but they din't really answer him fundamentally. In fact, all entries related to this topic seem to simply say something like, you're not using the $_SERVER variable correctly or something.
|
|
|
|
|
Logged
|
It's the things you learn after you know it all that really count. -John Wooden
|
|
|
|
Bompa
|
 |
« Reply #10 on: September 24, 2009, 05:44:16 PM » |
|
I found the same post... but they din't really answer him fundamentally. In fact, all entries related to this topic seem to simply say something like, you're not using the $_SERVER variable correctly or something.
Yah, his own code had a mistake, but my point is the IP showed elsewhere. Also, are we to understand that the raw server logs show no IP? Bompa
|
|
|
|
|
Logged
|
Do You Know?
|
|
|
|
nutballs
|
 |
« Reply #11 on: September 24, 2009, 07:23:54 PM » |
|
I cannot reproduce it myself, only happens with the occasional user.
I gotta check the logs but the prospect of checking them all, sucks. So now that I realized it might be just 1 server hopefully, I will check those logs. Once I figure out which server it is. Hopefully.
I also can't print the server array because it's not me causing it. It's only 1 out of 1000 about.
|
|
|
|
|
Logged
|
|
|
|
|
nutballs
|
 |
« Reply #12 on: September 24, 2009, 08:58:11 PM » |
|
BAH. its on all my servers. lol
|
|
|
|
|
Logged
|
|
|
|
|
nutballs
|
 |
« Reply #13 on: September 24, 2009, 09:17:03 PM » |
|
ok interesting. The IP is in the log file.
So im a bit lost.
basically, when a user/bot hits my remote sites, they do a file_get_contents to a magic URL. That URL is my mothership. A bunch of info is passed, 1 of which is the IP of the user. I guess something could be going wrong there, but I am getting all the other items, like the agent string and url and other stuff.
bah I hate this kind of shit.
|
|
|
|
|
Logged
|
|
|
|
|
kurdt
|
 |
« Reply #14 on: September 24, 2009, 10:39:43 PM » |
|
I know! Your visitors don't have IPs. Not everybody is born rich and they still want to use the interwebz.
|
|
|
|
|
Logged
|
Coming up with new features is easy - inventing features that replace old features is hard.
|
|
|
|