Email Spider Statistics

$hostname="localhost";
$userName="prayerz_dbuser";
$passWord="pass.monkey";

$conn=mysql_connect($hostName,$userName,$passWord);
mysql_select_db ("prayerz_spart");

if ($_POST["total"] > 0) {
$sql = “UPDATE spart_emailstats SET value=” . $_POST["total"] . ” WHERE variable=’total’”;

$result = mysql_query ($sql);
echo “updated total”;
}

if ($_POST["last_hour"] > 0) {
$sql = “UPDATE spart_emailstats SET value=” . $_POST["last_hour"] . ” WHERE variable=’last_hour’”;

$result = mysql_query ($sql);
echo “updated last_hour”;

}
if ($_POST["website"] <> “”) {
$sql = “UPDATE spart_emailstats SET value=’” . $_POST["website"] . “‘ WHERE variable=’last_website’”;
// echo $sql;
$result = mysql_query($sql);
echo “updated website”;
}

//echo “here”;
$sql = “SELECT value FROM spart_emailstats WHERE variable=’last_hour’”;
$results = mysql_query($sql);
$resultsrow = mysql_fetch_row($results);
echo “

Emails found by spider in the last hour: $resultsrow[0]

“;

$sql = “SELECT value FROM spart_emailstats WHERE variable=’total’”;
$results = mysql_query($sql);
$resultsrow = mysql_fetch_row($results);
echo “

Total found (since 10/11/2007): $resultsrow[0]

“;

$sql = “SELECT value FROM spart_emailstats WHERE variable=’last_website’”;
$results = mysql_query($sql);
$resultsrow = mysql_fetch_row($results);
echo “

Last new email discovered from: ” . $resultsrow[0] .”

“;

?>

One thought on “Email Spider Statistics

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>