HTTP_CLIENT_IP = "unknown"

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
William_I
Forum Newbie
Posts: 13
Joined: Sat Mar 29, 2003 8:22 am
Location: Manhattan

HTTP_CLIENT_IP = "unknown"

Post by William_I »

Is this a PHP 4.2.2 bug?

I have extra code in my XMB-powered forum that checks for the above condition and kicks users off the forum.

Recently, a troll has been on who's IP resolves to "unkown" within the stored IP information in the message database.

First, what likely IP spoofing method is he using?

Second, why isn't this working?
$ip = getenv(HTTP_CLIENT_IP);
if($ip == "unknown"){exit;}
User avatar
r337ard
Forum Commoner
Posts: 29
Joined: Tue Apr 15, 2003 6:14 am
Contact:

Post by r337ard »

technically if his IP address is unknown to the server, it cant send him any info. some information should show when he makes a socket connection to access the page, is there any way to log it? i cant hit php.net to check
William_I
Forum Newbie
Posts: 13
Joined: Sat Mar 29, 2003 8:22 am
Location: Manhattan

Post by William_I »

Digging through the access logs, I found this persons physical IP, so he wasn't fooling Apache... just PHP.

Any ideas how?

PHP also returned: "Warning: Address is not a valid IPv4 or IPv6" on lookup.
Post Reply