Raw vs. Header IP? Raw vs. Header IP?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Raw vs. Header IP?

Started by Graham J, February 19, 2004, 03:57:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Graham J

Hey all,

I don't think this is a support question but excuse me if it is )

Anyway, an anonymous person left a nasty comment on a pic on my gallery. I notice in the comments table in the database there are two fields with IP addresses msg_raw_ip and msg_hdr_ip

My question is what's the difference between these? A request can only come from one host so this confuses me a bit. Any help is appreciated.

Thanks,
Graham

Nibbler

If the user has a simple internet connection, ie 1 computer + modem they will both be the same.

If they are different this means there is some kind of network involved. The raw ip is the ip address of the pc with the internet connection/webcache/proxy. It is used to get the data from the server to the network. Many users within the network could post from this same ip. The header ip is the address of the actual computer within the network, and is used to tell the network which pc actually sent the data.

The raw ip is obtained from the server variable $HTTP_SERVER_VARS['REMOTE_ADDR']

The header ip is obtained from the server variable $HTTP_SERVER_VARS['HTTP_CLIENT_IP'] or $HTTP_SERVER_VARS['HTTP_X_FORWARDED_FOR']

Graham J

Excellent, thank you very much for your detailed and prompt reply. This will help me greatly )

Cheers,
Graham