$output = file_get_contents(“http://www.canadapost.ca/cpc2/addrm/hh/current/indexa/caONu-e.asp”);
var_dump($output);
$output = file_get_contents(http://www.canadapost.ca/cpc2/addrm/hh/current/indexa/caONu-e.asp); var_dump($output);
Share
HTTP 505 Status means the webserver does not support the HTTP version used by the client (in this case, your PHP program).
What version of PHP are you running, and what HTTP/Web package(s) are you using in your PHP program?
[edit…]
Some servers deliberately block some browsers — your code may “look like” a browser that the server is configured to ignore. I would particularly check the user agent string that your code is passing along to the server.