Creating Google Sitemap in PHP

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/

Being Social is More Easier

Google announced some little changes in Google Friend Connect. Creating a social gadget for Google Friend Connect just became a little easier and more flexible. Here are some of the recent changes that will impact you as a developer:

  • Friend Connect now supports OpenSocial Specification v0.9, which adds a number of important features to improve the gadget development process and the performance of gadgets. These features include OS Lite, OSML, templates, proxied content and more.
  • Want to ask site owners to configure additional preferences before adding your gadget to their sites? Now you can with the gadgets.Prefs functionality. Define the preferences you need in the XML gadgets specification, and the site owner will be asked to provide the values for the preferences when they get the code for the gadget. More information on the XML definition for these preferences is available in the OpenSocial XML Reference.
  • Let site owners customize the color of your gadget to match their sites. When the site owners generate the code for the gadget, they will have the option to set the colors they want to use, ensuring that the gadget integrates well with the style of their site. For more information on OpenSocial skins, see theĀ gadgets.skins API reference.
  • After your gadget is built, we would like to include it in the Friend Connect gadget gallery so that site owners will have more ways to engage their visitors. After testing your gadget and making sure it has the required fields in the gadget XML file, submit it for inclusion in our gallery. We will review your gadget and add it to our gallery once it is approved.

To learn more, visit Google Code. Thanks for taking the time to create your gadget and we look forward to seeing all the innovative gadgets that will make the web more social. With more than 5 million sites using Friend Connect, we’re sure they’ll find some good homes.

What is Canonical Link Element?

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

Google Squared

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

Oyun