This php script perform matching text of some certain URLs. but in this
preg_match it wont match few patterns < _ .
with help of this script , can some body help me to match the other all
patterns .............plz ?
<?php
$user="root";
$pass="****";
$db="aa";
$dblink = mysql_connect("localhost:3306", "$user", "$pass")or
die("Could not connect to db");
mysql_select_db($db) or die ("can't select the db");
$result = mysql_query ("select indexNo,Reply from Acknowledgement order
by indexNo") or die ("Invalid query");
while ( $rset= mysql_fetch_array($result)) {
/* Lets check the reply with the database*/
$chk_msg= $rset["Reply"];
//echo "checking $chk_msg in $msg<br>";
if ( preg_match("/$chk_msg/", "$msg", $match) ) {
// match found
$SQL="update Status set Status = 'UP' where
ServiceNo=".$rset["ServiceNo"];
mysql_query ("$SQL") or die ("Invalid 2nd query");
}else{
// SERIVCE DOWN
// nothing to do here.
//echo "No match..<br>";
}
}
mysql_close($dblink);
?>
thanx in advance,
chandana