|
12-18-2003, 02:20 AM | #1 |
Green Mole
Join Date: Dec 2003
Posts: 8
|
show number of indexed pages on homepage
like google
|
12-18-2003, 03:01 AM | #2 |
Green Mole
Join Date: Dec 2003
Posts: 8
|
I don't know much about php but... I got it
before head: PHP Code:
PHP Code:
|
03-04-2004, 02:09 PM | #3 |
Green Mole
Join Date: Mar 2004
Posts: 7
|
He
Where this must be added?
|
03-04-2004, 03:28 PM | #4 |
Green Mole
Join Date: Dec 2003
Posts: 8
|
in the code of the page where you want to display the number of indexed pages
|
12-09-2004, 09:31 AM | #5 |
Orange Mole
Join Date: Jan 2004
Posts: 30
|
Show number of indexed pages on homepage
Code:
<? $db=mysql_connect('host','db_user','db_pass'); mysql_select_db("database_name"); $query = "SELECT * FROM spider"; $results = mysql_query($query); $num_results = mysql_num_rows($results); ?> Searching <?echo $num_results?> web pages |
01-18-2005, 05:36 PM | #6 |
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 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
show sites indexed | richwilson | How-to Forum | 2 | 04-06-2006 05:31 PM |
Number of pages indexed | claudiomet | How-to Forum | 0 | 08-30-2004 03:26 PM |
Set time limit on spider.php or number of pages | paullind | Troubleshooting | 1 | 05-01-2004 08:25 AM |
pages number limited indexing | JÿGius³ | Mod Requests | 4 | 01-13-2004 12:17 PM |
Limit number of spidered pages | Not Logged In | How-to Forum | 5 | 12-16-2003 04:03 PM |