#! /Usr/bin/perl-W
Use dBi;
Use lwp: simple QW (get );
# $ Driver = "MySQL ";
$ DBH = DBI-> connect ("DBI: mysql: csunet: localhost", "root", "") | die "can not connect database ";
# Date of Generation
$ Year = (gmtime time) [5] + 1900;
$ Month = (gmtime time) [4] + 1;
$ Date = (gmtime time) [3];
$ Today = $ year. "-". $ month. "-". $ date;
$ SQL = "Select phone from duty_info where riqi = '". $ today ."'";
$…… = $ DBH-> prepare ($ SQL) | die "occur an error when query database! ";
$ Something-> execute ();
$ Numrows = $ something-> rows;
While (@ ROW = $ th-> fetchrow_array)
{
$ Number = $ row [0];
}
If ($ numrows = 1)
{
My $ url = 'HTTP: // 202.197.54.130: 9999/cgi-bin/csend.exe? N = 13687363993, '. $ number.' & M = provincial network 7206 router fault check ';
My $ content = get $ URL;
Print $ content;
Print "/N ";
}
Print "the number of conditions is: $ numrows/N ";
Print $ today;
Print "/N ";
Print $ SQL;
Print "/N ";
$ Something-> finish ();
$ DBH-> disconnect ();
Exit 0;