<?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>Sun, 15 Jan 2012 00:45:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
	<atom:link rel="hub" href="http://superfeedr.com/hubbub" />
		<item>
		<title>By: php + json + twitter api - Richard Maisano</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-32784</link>
		<dc:creator>php + json + twitter api - Richard Maisano</dc:creator>
		<pubDate>Wed, 01 Jun 2011 05:34:25 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-32784</guid>
		<description>[...] a simple PHP script he found to aggregate his Twitter posts. The code he found, from the website of Brian Cray, was great, though it wouldn&#8217;t work on his server. He tried to use it though the server [...]</description>
		<content:encoded><![CDATA[<p>[...] a simple PHP script he found to aggregate his Twitter posts. The code he found, from the website of Brian Cray, was great, though it wouldn&#8217;t work on his server. He tried to use it though the server [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: c-note</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-32695</link>
		<dc:creator>c-note</dc:creator>
		<pubDate>Fri, 10 Dec 2010 10:15:22 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-32695</guid>
		<description>Yeah nice function but I keep getting a message from line 11:

 mkdir(dirname(__FILE__) . &#039;/caches&#039;, 0777); 

File already exists.</description>
		<content:encoded><![CDATA[<p>Yeah nice function but I keep getting a message from line 11:</p>
<p> mkdir(dirname(__FILE__) . &#8216;/caches&#8217;, 0777); </p>
<p>File already exists.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Beun</title>
		<link>http://briancray.com/2009/08/21/tweeted-links-twitter-api-php-cache/#comment-32684</link>
		<dc:creator>Beun</dc:creator>
		<pubDate>Tue, 16 Nov 2010 08:36:28 +0000</pubDate>
		<guid isPermaLink="false">http://briancray.com/?p=1082#comment-32684</guid>
		<description>Great post :)

Any suggestion on in what way to edit line 7, so the script will show the latest tweets, period, and not just the ones containing links?

Thanks!</description>
		<content:encoded><![CDATA[<p>Great post <img src='http://briancray.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Any suggestion on in what way to edit line 7, so the script will show the latest tweets, period, and not just the ones containing links?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<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;<a href="http://search.twitter.com/search.json?q=" rel="nofollow">http://search.twitter.com/search.json?q=</a>&#8216; . 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>
</channel>
</rss>

