Forum Moderators: coopster
Since googlebot and other bots only grab up to 50 (or 100?) links on a page, i think a lot of ppl would find this useful.
Reason I want it: I have a news archive page. On this news archive page I have links to every week of news on my site (well over 400 links). Bots won't crawl past about 100.. so i need a script.
I have used phplinks [sourceforge.net...]
and just modified the output so that Google will go through it properly. The standard design does not do this as it sets up sessions for each person. Ideally someone could modify it so that knows when it is Google bot and not set up the session.
[edited by: jatar_k at 2:40 am (utc) on Mar. 16, 2004]
[edit reason] no personal urls thanks [/edit]
Also, if you are alright with perl+mysql, then check out Links SQL, it is all what you are looking for and much much much more...
And if you are wanting only php+mysql solution, then check out indexU and in-link, they both have mods available that can make it have static urls.
Hope this helps.
Two simple pages for the mod to phplinks
main directory page:
++++++++++++++++++++++
<?php
include("../phplib/databaseconnect.inc");
mysql_select_db("domain_lnks1",$db);
// ************************* File Header
echo ("<html>
<head>
<title>Japanese Web Directory</title>
<META NAME='description' CONTENT='Directory of web sites related to Japan or Japanese culture, lifestyle, food, fashion, organisations, shopping or travel.'>
</head>
<body> ");
include("templates/directory_lhs.inc");
//********* LINK DATA ***************************************
$result = mysql_query("SELECT * FROM categories ORDER BY Category ",$db);
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=1 width='470'>\n";
echo "<tr><td colspan='4'><font size='4' face='Arial'><center><H1><b>JAPANESE WEB DIRECTORY</b></H1></center><p></font><font size='2' face='Arial'>Directory of web sites related to Japan or Japanese culture, lifestyle, food, fashion, organisations, shopping or travel. Boost traffic to your Japanese related web site by submitting your site. The Japanese Web Directory is indexed by the popular search engines. Listing here can increase your ranking in the popular search engines. <a href='japanese_directory/'>Submit new sites here.</a>
</font></tr>";
do {
$myrow["link_cat_url"]= "<a href='japanese_directory_detail.php?category_id=" . $myrow["ID"] ."'>" . $myrow["Category"] . "</a>";
printf("<tr><td colspan='4'><font size='2' face='Arial'><b>%s</b> - %s</font><br><br></tr>\n", $myrow["link_cat_url"], $myrow["Description"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";
}
//*************************** RHS Ads
include("templates/footer.inc");
include("templates/directory_rhs.inc");
//********************************
</body>
</html>
?>
+++++++++++++++++++++++++++++++++++++++++++++++
Individual directory page
+++++++++++++++++++++++++++++++++++++++++++++++
<?php
include("../phplib/databaseconnect.inc");
mysql_select_db("domain_lnks1",$db);
$category_data = mysql_query("SELECT * FROM categories WHERE ID=$category_id",$db);
if ($myrow = mysql_fetch_array($category_data)) {
do {
$category_name_text=$myrow["Category"];
$category_description_text=$myrow["Description"];
} while ($myrow = mysql_fetch_array($category_data));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";
}
// ************************* File Header
echo ("<html>
<head>
<title>Japanese Web Directory - $category_name_text");
echo ("</title>
<META NAME='description' CONTENT=Japanese Web Directory - $category_name_text $category_description_text");
echo (" >
</head>
<body> ");
include("templates/directory_lhs.inc");
//********* LINK DATA ***************************************
$result = mysql_query("SELECT * FROM links WHERE Category=$category_id ORDER BY SiteName",$db);
if ($myrow = mysql_fetch_array($result)) {
echo "<table border=1 width='470'>\n";
echo "<tr><td colspan='4'><font size='4' face='Arial'><center><H1><b>Japanese Directory - $category_name_text</b></H1></center><p>
<font size='2' face='Arial'>Directory of web sites featuring $category_description_text <br>Return to <a href='japanese_directory.php'>Japanaese Web Directory Home.</a><br><a href='japanese_directory/'>Submit new sites here.</a><br><br></font></tr>";
do {
$myrow["link_url"]= "<a target='_blank' href='" . $myrow["SiteURL"] ."'>" . $myrow["SiteName"] . "</a>";
printf("<tr><td colspan='4' BGCOLOR='#c0c0c0'><b><font size='2' face='Arial'>%s</font></b></tr>\n", $myrow["link_url"]);
printf("<tr><td colspan='4'><font size='2' face='Arial'>%s</font><br><br></tr>\n", $myrow["Description"]);
} while ($myrow = mysql_fetch_array($result));
echo "</table>\n";
} else {
echo "Sorry, no records were found!";
}
//*************************** RHS Ads
include("templates/footer.inc");
include("templates/directory_rhs.inc");
//********************************
</body>
</html>
?>