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