faqts : Computers : Programming : Languages : PHP : Common Problems : HTTP Headers

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

20 of 44 people (45%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

What HTTP Headers contain information about IP Address of the client?

Aug 17th, 2005 13:12
Thomas Capote, taylor gerring, dany aka,


No HTTP header contains such information. However, that kind of 
information is available as server variables; for example, to get the 
IP of the client, you need to reference $REMOTE_ADDR.
Or use the $_SERVER superglobal variable like this:
  $clientIP = $_SERVER['REMOTE_ADDR'];