Write server side script (CGI) which will do something with database and
generate html report about it.
Sample:
#!/usr/bin/perl
use CGI qw(:standard);
use DBI;
$mydb="your database";
$host="localhost";
$opt_user="comcast";
$opt_password="password";
$error=0;
$dbh = DBI->connect("DBI:mysql:$mydb:$host",$opt_user,$opt_password) or
$error=$DBI::errstr\n";
$sth=$dbh->prepare("select count(*) from my_table");
$sth->execute() or $error.="<br>" . $sth->errstr;
$row=$sth->fetchrow_arrayref;
$number=$row->[0]*1;
$sth->finish;
$rc=$dbh->disconnect;
print "Content-type: text/html\n\n";
print <<"EOF";
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1250">
</HEAD>
<BODY>
EOF
if(length($error) > 0) {print $error;}
else {print "Database live and have $number records";}
print "</body></html>\n";
Petr Vileta, Czech republic
(My server reject all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)
----- Original Message -----
From: "Bill Seeley" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, April 17, 2005 4:14 AM
Subject: Using LWP::Request to GET pages with embedded Javascript calls
> I'm using the LWP::Request module (the lwp-request batch file actually) to
> monitor web site response time for specific URL's that attempt to load
> Javascript library routines. My script is able to retrieve and display
the
> HTML, but the Javascript load fails. Can someone suggest an approach to
> this problem? The Javascript is apparently performing some important
> functions (like database retrievals) that I would like to test to insure
> that the web page is really "up".
>
> Thanks,
> Bill
>
>
> _______________________________________________
> ActivePerl mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs