<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mike Griffiths &#187; Twitter</title>
	<atom:link href="http://www.mike-griffiths.co.uk/tag/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mike-griffiths.co.uk</link>
	<description>Blog</description>
	<lastBuildDate>Tue, 13 Dec 2011 13:01:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>SEO Friendly PHP Twitter Script</title>
		<link>http://www.mike-griffiths.co.uk/seo-friendly-php-twitter-script/</link>
		<comments>http://www.mike-griffiths.co.uk/seo-friendly-php-twitter-script/#comments</comments>
		<pubDate>Mon, 25 Jan 2010 00:34:15 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.mike-griffiths.co.uk/?p=148</guid>
		<description><![CDATA[There are loads of scripts out there for pulling in your Twitter posts.  A lot, if not most of them, base themselves heavily on JavaScript.  This is bad for 3 reasons:

People with JS disabled can&#8217;t read them
It&#8217;s bad for your website&#8217;s search engine rank (SEO) as the search bots can&#8217;t read them
It slows [...]]]></description>
			<content:encoded><![CDATA[<p>There are loads of scripts out there for pulling in your <a href="http://twitter.com/mikemike86">Twitter</a> posts.  A lot, if not most of them, base themselves heavily on JavaScript.  This is bad for 3 reasons:</p>
<ol>
<li>People with JS disabled can&#8217;t read them</li>
<li>It&#8217;s bad for your website&#8217;s search engine rank (SEO) as the search bots can&#8217;t read them</li>
<li>It slows user&#8217;s browsers down (if only slightly)</li>
</ol>
<p>I have written a very simple PHP script that pulls in your Twitter posts, and outputs them in an unordered list.  Feel free to use however you like:</p>
<pre lang="php">
&lt;?php
// Your Twitter username
$username = 'mikemike86';
$rssUrl = "http://twitter.com/statuses/user_timeline/$username.rss";
$rss = @file_get_contents($rssUrl);

if($rss){
	$xml = @simplexml_load_string($rss);
		if($xml !== false){
			$var=true;
			foreach($xml->channel->item as $tweet){
				//echo $tweet->pubDate."\n";
				echo '<a href="'.$tweet->link.'" title="Go to SEO tweet">'.substr($tweet->description,(strlen($username)+2))."</a>\n\n";

				if($var){
					break;
				}
			}
		} else {
			echo "Error: RSS file not valid!";
		}
	} else {
		echo "Error: RSS file not found. Username invalid or requires authentication";
	}
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mike-griffiths.co.uk/seo-friendly-php-twitter-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

