Altered not to use $errstr from fsockopen().