Yahoo sitemap PHP script
Although Yahoo is used as search engine much less than Google, it should not be omitted. Unlike the Google sitemap, where we created xml file, in this case we create a simple text file with list of all indexed-to-be URLs. (This file could be used instead of the regular Google sitemap but NOT recommended).
Now, open your favorite text editor and paste the bolded code bellow:
<?
// Connecting, selecting database
$link = mysql_connect(’localhost’, ‘db_username’, ‘db_pass’)
//db_username is the database username; db_pass is the database password
or die(’Could not connect: ‘ . mysql_error());
mysql_select_db(’data_base_name’) or die(’Could not select database’);
//data_base_name is the DB you connect to
// Performing SQL query
$query = ‘SELECT item_id FROM db_table_name WHERE some_condition=1′;
$result = mysql_query($query) or die(’Query failed: ‘ . mysql_error());
[read more...]