View Single Post
Old 01-18-2005, 04:36 PM   #6
BulForce
Orange Mole
 
Join Date: Aug 2004
Location: none
Posts: 33
Before the </head> tag add this lines:

<?php
$relative_script_path = '/home/virtual/site15/fst/var/www/search';
include "$relative_script_path/includes/config.php";
?>

change "/home/virtual/site10/fst/var/www/search" with your full script path

then at the place where you want to display the pages add this code:

<?php
$phpdig_tables = array('spider'=>'Currently indexed');

while (list($table,$name) = each($phpdig_tables))
{
$result = mysql_fetch_array(mysql_query("SELECT count(*) as num FROM ".PHPDIG_DB_PREFIX."$table"),MYSQL_ASSOC);
print "$name ".$result['num']." pages";
}
?>

And in the place where you want to display the hosts add this code:

<?php
$phpdig_tables = array('sites'=>'At');

while (list($table,$name) = each($phpdig_tables))
{
$result = mysql_fetch_array(mysql_query("SELECT count(*) as num FROM ".PHPDIG_DB_PREFIX."$table"),MYSQL_ASSOC);
print "$name ".$result['num']." hosts";
}
?>

Thas all
BulForce is offline   Reply With Quote