Bruno Veldeman wrote:
: I am doing a sub for checking if a URL is active or not.
: ...
: If I try it on http://www.grn.es it works ($response->code = 200)
: But with http://encarta.msn.es it returns 0. ($response->code = 500)
Response code 500 means an internal error on the server. Your code is
reaching the server OK, but the server is throwing an error when it
tries to process your request. Since the site works from a browser, I
would guess that they're looking for a cookie or something, and not
trapping the error gracefully when they don't see it. Otherwise your
sub looks fine.
-- tdk