As ww said, the problem is too generic to offer much help. When you say the script is working perfectly on another server, do you mean it's running on another server and checking this same host successfully, or that it's checking another host successfully? One thing I noticed: should a header called server be set to something like OpenDNS Guide? That seems odd.

For what it's worth, sometimes servers will be (mis)configured to return error codes if they don't receive certain headers or header values. I've seen this more often with Windows servers, for whatever reason. For instance, someone might be trying to serve different content to different browsers, and they didn't set up a default version, so when it sees "libwww-perl/5.836", it just fails. Or it might refuse to send pages to a 'browser' that doesn't send an Accept-Language header. You see odd stuff like that now and then when you're trying to automate stuff like this.

If you don't have control of the server you're trying to monitor, your options are limited. Basically, you can try to emulate a browser as much as possible, and try sending different combinations of headers, until something works.

Aaron B.
Available for small or large Perl jobs; see my home node.


In reply to Re: LWP Script suddenly stopped working... by aaron_baugher
in thread LWP Script suddenly stopped working... by fatmcgav

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.