<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Use PHP to cache and display your tweeted links</title>
	<atom:link href="http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/feed/" rel="self" type="application/rss+xml" />
	<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/</link>
	<description>User Experience Design, Web Development, and Internet Marketing</description>
	<lastBuildDate>Fri, 30 Jul 2010 19:34:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
	<atom:link rel="hub" href="http://superfeedr.com/hubbub" />
		<item>
		<title>By: Jan-Marten de Boer</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-32281</link>
		<dc:creator>Jan-Marten de Boer</dc:creator>
		<pubDate>Wed, 14 Apr 2010 19:39:48 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-32281</guid>
		<description>I&#039;d like to go with something that involves my login credentials and list my own timeline rather than the search results, because you&#039;ll also get the rubbish that others post using your name this way. Except for using credentials, it&#039;s a nice piece of work.</description>
		<content:encoded><![CDATA[<p>I&#8217;d like to go with something that involves my login credentials and list my own timeline rather than the search results, because you&#8217;ll also get the rubbish that others post using your name this way. Except for using credentials, it&#8217;s a nice piece of work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Cray</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28234</link>
		<dc:creator>Brian Cray</dc:creator>
		<pubDate>Fri, 28 Aug 2009 18:30:43 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28234</guid>
		<description>Derek: I hate to say it but I used this code on my site for less than one day. I found out tweetmeme.com published an RSS feed of my bookmarks and I just programmatically grab that RSS feed and display the links =) It makes it so I don&#039;t show the tweet text... hehe</description>
		<content:encoded><![CDATA[<p>Derek: I hate to say it but I used this code on my site for less than one day. I found out tweetmeme.com published an RSS feed of my bookmarks and I just programmatically grab that RSS feed and display the links =) It makes it so I don&#8217;t show the tweet text&#8230; hehe</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek Gathright</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28233</link>
		<dc:creator>Derek Gathright</dc:creator>
		<pubDate>Fri, 28 Aug 2009 18:26:13 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28233</guid>
		<description>CURL is likely the proper way to go, but man it is such a pain to remember all those options.  For those servers with PHP&#039;s file_get_contents() by url enabled (most do), you can just do:
 
$url = &#039;http://search.twitter.com/search.json?q=&#039; . urlencode(&#039;from:&#039; . $username . &#039; filter:links&#039;) . &#039;&amp;rpp=&#039; . $tweets;	
file_get_contents($url);

Also, for those more comfortable using arrays in PHP as opposed to objects (likely most people), check out the 2nd param in json_decode(), it&#039;s a boolean that flips the return type to an array instead of an object. So instead of $json-&gt;results, you can use $json[&#039;results&#039;].  With large, nested json responses, sometimes it can look like $json-&gt;results[0]-&gt;some_val-&gt;some_array[2];  Such a pain to remember what is an array and what is an object sometimes.

If anyone wants to do this with jQuery, which unloads the search request to the client and doesn&#039;t eat up your API calls, you can check out my suggestion in the comments @  http://woork.blogspot.com/2009/07/twitter-api-how-to-create-stream-of.html#comment-15147955.  Slight modification would need to be made for links.


Another great tutorial.  Thanks Brian.</description>
		<content:encoded><![CDATA[<p>CURL is likely the proper way to go, but man it is such a pain to remember all those options.  For those servers with PHP&#8217;s file_get_contents() by url enabled (most do), you can just do:</p>
<p>$url = &#8216;http://search.twitter.com/search.json?q=&#8217; . urlencode(&#8216;from:&#8217; . $username . &#8216; filter:links&#8217;) . &#8216;&amp;rpp=&#8217; . $tweets;<br />
file_get_contents($url);</p>
<p>Also, for those more comfortable using arrays in PHP as opposed to objects (likely most people), check out the 2nd param in json_decode(), it&#8217;s a boolean that flips the return type to an array instead of an object. So instead of $json-&gt;results, you can use $json['results'].  With large, nested json responses, sometimes it can look like $json-&gt;results[0]-&gt;some_val-&gt;some_array[2];  Such a pain to remember what is an array and what is an object sometimes.</p>
<p>If anyone wants to do this with jQuery, which unloads the search request to the client and doesn&#8217;t eat up your API calls, you can check out my suggestion in the comments @  <a href="http://woork.blogspot.com/2009/07/twitter-api-how-to-create-stream-of.html#comment-15147955" rel="nofollow">http://woork.blogspot.com/2009/07/twitter-api-how-to-create-stream-of.html#comment-15147955</a>.  Slight modification would need to be made for links.</p>
<p>Another great tutorial.  Thanks Brian.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Magdalena Uri</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28196</link>
		<dc:creator>Magdalena Uri</dc:creator>
		<pubDate>Thu, 27 Aug 2009 18:40:34 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28196</guid>
		<description>Serving a web page from a cache is an automated action, and the end user clicks on the link for the cached page. &lt;a href=&quot;http://referer.wordpress.com/&quot; rel=&quot;nofollow&quot;&gt;Magdalena Uri&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Serving a web page from a cache is an automated action, and the end user clicks on the link for the cached page. <a href="http://referer.wordpress.com/" rel="nofollow">Magdalena Uri</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ashwin</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28107</link>
		<dc:creator>Ashwin</dc:creator>
		<pubDate>Tue, 25 Aug 2009 18:11:01 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28107</guid>
		<description>I was looking for such a PHP snipped sometime now.  Now got it through your blog.

Very neat! Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>I was looking for such a PHP snipped sometime now.  Now got it through your blog.</p>
<p>Very neat! Thanks for sharing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kevinbruce</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28059</link>
		<dc:creator>kevinbruce</dc:creator>
		<pubDate>Mon, 24 Aug 2009 15:47:25 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28059</guid>
		<description>very nice, very clean and simple!</description>
		<content:encoded><![CDATA[<p>very nice, very clean and simple!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Use PHP To Cache And Display Your Tweeted Links &#124; Design Newz</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28031</link>
		<dc:creator>Use PHP To Cache And Display Your Tweeted Links &#124; Design Newz</dc:creator>
		<pubDate>Fri, 21 Aug 2009 22:32:33 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28031</guid>
		<description>[...] Use PHP To Cache And Display Your Tweeted Links [...]</description>
		<content:encoded><![CDATA[<p>[...] Use PHP To Cache And Display Your Tweeted Links [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mantas K.</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28028</link>
		<dc:creator>Mantas K.</dc:creator>
		<pubDate>Fri, 21 Aug 2009 19:59:03 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28028</guid>
		<description>wow i havent touched PHP since 4.2 i believe...this will take time to get back into web programming :)...good tutorial, bookmarked and for sure will use!</description>
		<content:encoded><![CDATA[<p>wow i havent touched PHP since 4.2 i believe&#8230;this will take time to get back into web programming <img src='http://briancray.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> &#8230;good tutorial, bookmarked and for sure will use!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Cray</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28026</link>
		<dc:creator>Brian Cray</dc:creator>
		<pubDate>Fri, 21 Aug 2009 18:43:11 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28026</guid>
		<description>You&#039;re welcome =)</description>
		<content:encoded><![CDATA[<p>You&#8217;re welcome =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nokadota</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-28024</link>
		<dc:creator>Nokadota</dc:creator>
		<pubDate>Fri, 21 Aug 2009 16:25:52 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-28024</guid>
		<description>Oh now this is just wonderful. Thanks a bunch for the tutorial.</description>
		<content:encoded><![CDATA[<p>Oh now this is just wonderful. Thanks a bunch for the tutorial.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
