Creating Google Sitemap in PHP
Jun0
We can create dynamic sitemap with using PHP & Mysql. My example code is easy to apply your system.
<?PHP
header('content-type: text/xml');
$mysql_username = "";
$mysql_password = "";
$mysql_database = "";
$dblink = mysql_connect("localhost", "$mysql_username", "$mysql_password");
if (!$dblink) {
die('ERROR: Can not connect database' . mysql_error());
}
@mysql_select_db("$mysql_database") or die ("ERROR: Cannot select database");
echo('<'.'?xml version="1.0" encoding="UTF-8"'.'?'.'>');
echo('<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">');
$contentQ = mysql_query("SELECT * FROM content_table");
while($contentR = mysql_fetch_array($contentQ))
{
$url = $contentR["url"];
$adding_date = date("Y-m-d",strtotime($contentR["adding_date"]));
echo("<url>
<loc>http://www.example.com/".$url."</loc>
<lastmod>".$adding_date."</lastmod>
</url>
");
}
$content2Q = mysql_query("SELECT * FROM content2_table");
while($content2R = mysql_fetch_array($content2Q))
{
$url = $content2R["url"];
$adding_date = date("Y-m-d",strtotime($content2R["adding_date"]));
echo("<url>
<loc>http://www.example.com/".$url."</loc>
<lastmod>".$adding_date."</lastmod>
</url>
");
}
echo("</urlset>");
?>
Google Sitemap Plugins for Wordpress
http://www.dicontas.co.uk/blog/google-sitemap-utw-tag-wordpress-plugin/
http://www.arnebrachhold.de/redir/sitemap-home/
http://www.karailiev.net/karailievs-sitemap/
http://southcoastwebsites.co.uk/wordpress/
What is Canonical Link Element?
Jun0
Google, Yahoo, Ask and Microsoft announced support for a new link element to clean up duplicate urls on sites. We add HEAD part of document, its syntax is pretty simple
<link rel="canonical" href="http://www.webmastersucks.com/pages.html" />
This syntax is telling search engines that the preferred location of this url is http://www.webmastersucks.com/pages.html instead of http://www.webmastersucks.com/pages.html?PHPSESSID=293JA434MFNs
yoast.com has already produced several plugins for WordPress, Magento and Drupal. You can find plugins in Yoast.
If we used “canonical”, then our contentĀ is not dublicated. These are same, and search engines see the same content. Make all the non-canonical urls do a permanent (301) HTTP redirect to the canonical/preferred url.
www.example.com
example.com
www.example.com/
example.com/
www.example.com/index.html
example.com/index.html
Links About Canonical Link Element
Matt Cutts’s Slide Show >
Google’s Blog Post >
Yahoo’s Blog Post >
Bing’s Blog Post >
Ask.com’s Blog Post >
Google Squared is Opened
Jun0

Google Squared
If you need to find informations grouped, Google Squared is for you. It is grouping the informations and give it in to the tables. It is more simple then using search engine. Technology is also improving, you can add and change information with logining google. I hope you will enjoy Squared, www.google.com/squared
Some examples for Google Squared:
US Presidents
http://www.google.com/squared/search?q=US%20presidents&suggest=1
Programming Languages
http://www.google.com/squared/search?q=programming+languages
Web Programming
http://www.google.com/squared/search?q=web+programming+languages
Web Servers
http://www.google.com/squared/search?q=web+servers
Source : http://googleblog.blogspot.com/2009/06/square-your-search-results-with-google.html

