correct way to get client ip address ?
i'm writing socket program..
suppose i create a webserver..
i want to record all clients ip ..
what is the correct way to do this ?
For now, i solve this problem with directly parsing the header of every request that come from client. (i got the client ip from the "Referer: http://xxx.xx.xx.x/bla.html" line. This doesn't seem correct to me..(is it correct ??)
Anyway.., any suggestion ?
|