marza
I had a similar need and wrote a script that goes to a few urls, grabs the html and stuffs it into an array and then uses a regex to find the information that i want, and then prints it out. That may be one way to check the version date on McAfee's website. Here's an excerpt of the code that i wrote:
use strict; use LWP::UserAgent; ##### Declaring my local variables, initializing useragent and open lo +g file.####### my($url, @urls); my $ua = LWP::UserAgent->new(); open(OUT,">results.log") or die "Couldn't open results.log"; print OUT "\n"; ##### Stuffing the urls into an array ##################### @urls = ("http://www.blahblah.com, http://www.blah.com, ); #### Looping through the urls, grabbing the html and stuffing it into +an array. #### foreach $url(@urls){ my $request = new HTTP::Request('GET',$url); $ua->timeout(10); my $response = $ua->request($request); my $responsecode = $response->code(); print "GET failed\n" if $responsecode != 200; my @ARRAY_OF_LINES = (split "\n", $ua->request($request)->as_string); my $row; #### Parsing the html with a regex to find the the updated times ##### +## foreach $row (@ARRAY_OF_LINES) { chomp($row); if ($row =~ /.*?Updated\s*:\s*(\w+\s*-\s*\d{1,2}\s+\d{1,2}:\d{1,2 +}:\d{1,2}\s+PST)/i) { print OUT "Last Updated: $1\n\n"; last; }elsif ($row =~ /.*?Updated\s*:\s*(\w+\s*\w+\s*\d{1,2}\s+\d{1, +2}:\d{1,2}:\d{1,2}\s+PST\s*\d*)/i) { print OUT "Last Updated: $1\n\n"; last; } } } close(OUT);
Good luck and i hope this can point you in the right direction.
Ray

In reply to Re: How do I get information from a vendors web page. by RayRay459
in thread How do I get information from a vendors web page. by Marza

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.