$unregisteredhost=@gethostbyaddr($ipaddress); if (strlen($unregisteredhost)>1 AND $postusername=='Unregistered') { $postusername=$unregisteredhost; } else if ($ipaddress AND $postusername=='Unregistered') { $postusername=$ipaddress; }