Forum Moderators: coopster

Message Too Old, No Replies

SE Friendly auto generated links page

         

zorafex

5:53 pm on Mar 13, 2004 (gmt 0)

10+ Year Member



Could someone make a php script that will read a specified file and grab all of the links (and corresponding link text) in the file, and re-generate the links but only display 50 of them. If there is more than 50 of them, the script will automatically add a next button, to go to the next page of the links.. and so on until all have been displayed.

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.

jatar_k

7:09 pm on Mar 13, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



try hotscripts.com or one of the other online script resources. There are a bunch of those type scripts around.

whats up skip

8:09 am on Mar 15, 2004 (gmt 0)

10+ Year Member



This is close to what you want.

You can modify it from there.

ukgimp

10:06 am on Mar 15, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



whats up skip

What is close? :)

zorafex

11:40 pm on Mar 15, 2004 (gmt 0)

10+ Year Member



Thanks jatar_k, but I have already looked there without sucess. Most of the scripts there, are very advanced. I just need something very simply made that I can modify easily.

whats up skip

11:48 pm on Mar 15, 2004 (gmt 0)

10+ Year Member



Sorry I missed the information.

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]

HeyJim

2:56 pm on Apr 9, 2004 (gmt 0)

10+ Year Member



whats up skip,
Are the mods difficult? It looks like an interesting script but I'd need something a whole lot more search engine friendly. Sounds as if you were able to accomplish that?

NeedScripts

3:16 pm on Apr 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you looking for a free or a paid option?

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.

whats up skip

3:13 am on Apr 10, 2004 (gmt 0)

10+ Year Member



I didn't realise someone had removed the link. How else can I show the output?

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>
?>