How to Detect Client IP Address

Proper use of HTTP X FORWARDED FOR