PhpDig.net

PhpDig.net (http://www.phpdig.net/forum/index.php)
-   Mod Requests (http://www.phpdig.net/forum/forumdisplay.php?f=23)
-   -   List how many Sites have been indexed? (http://www.phpdig.net/forum/showthread.php?t=2672)

Dan 10-29-2006 11:15 AM

List how many Sites have been indexed?
 
Hi,

How can you show on your homepage how many sites are currently indexed by the search engine?

-Dan

CentaurAtlas 11-17-2006 06:00 AM

You should be able to do a mysql command to count the number of entries in the sites table to show the sites indexed.

Something like this command from the mysql command prompt would show the number of sites:
SELECT count(*) as num FROM phpdig_sites;

(assuming your table is phpdig_sites, it could be just sites or something else).

So you could do something like this (haven't tested, but hopefully the idea is clear):
<?php
$num_sites = mysql_query("SELECT count(*) as num FROM phpdig_sites;");
echo "Number of sites indexed: ";
echo $num_sites;
echo "\n";
?>

[Sorry for any typos, in a rush! ;-) ]


All times are GMT -8. The time now is 08:30 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.