I need a little help with the fsockopen function.

I have this PHP code

Code:
   if (    in_array($_SERVER['REMOTE_PORT'], array(8080,80,6588,8000,3128,553,554,47830,50070))
    || @fsockopen($_SERVER['REMOTE_ADDR'], 80, $errno, $errstr, 1))
I need to make @fsockopen check IPs by port 80 if it doesn't request authentication.

I think I should use isset($_SERVER['PHP_AUTH_USER']) in there somewhere,...