u can use

$ip=getHostByName(@"REMOT_ADDR");

i thinks its work...