Using this script I get a webpage and put its contest into a varible. However, if a parameter such as URL is invalid, the scripts outputs messages such as "<H1>Bad Request (invalid hostname)</H1>" and 404 Web Page wasn't found on the server. Those are not PHP error messages.
What can I do to prevent the scripts from showing received error messages.