![]() |
show number of indexed pages on homepage
like google ;)
|
I don't know much about php but... I got it :)
before head: PHP Code:
PHP Code:
|
He
Where this must be added?
|
in the code of the page where you want to display the number of indexed pages
|
Show number of indexed pages on homepage
Code:
<? |
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 :) |
All times are GMT -8. The time now is 01:22 AM. |
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.