<?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: PHP: Post to Twitter and append content to 140 chars.</title>
	<atom:link href="http://www.markdalby.com/php-post-to-twitter-and-append-content-to-140-chars/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markdalby.com/php-post-to-twitter-and-append-content-to-140-chars/</link>
	<description>Fighting Ignorance since 1986 (It’s taking longer than I thought).</description>
	<lastBuildDate>Tue, 21 Jun 2011 16:02:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: admin</title>
		<link>http://www.markdalby.com/php-post-to-twitter-and-append-content-to-140-chars/comment-page-1/#comment-18</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Thu, 15 Oct 2009 08:04:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.markdalby.com/?p=26#comment-18</guid>
		<description>@Max have a read of this.. http://www.codingthewheel.com/archives/codingthetweet</description>
		<content:encoded><![CDATA[<p>@Max have a read of this.. <a href="http://www.codingthewheel.com/archives/codingthetweet" rel="nofollow">http://www.codingthewheel.com/archives/codingthetweet</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://www.markdalby.com/php-post-to-twitter-and-append-content-to-140-chars/comment-page-1/#comment-17</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Wed, 14 Oct 2009 17:52:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.markdalby.com/?p=26#comment-17</guid>
		<description>How to use the Consumer Key and Consumer Secret codes to let appear &quot;from Vareside.com&quot; below every tweet posted via Vareside.com?</description>
		<content:encoded><![CDATA[<p>How to use the Consumer Key and Consumer Secret codes to let appear &#8220;from Vareside.com&#8221; below every tweet posted via Vareside.com?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mark Dalby Featured Uncategorized PHP Post to Twitter and append content to 140 chars. &#187; Auto Post Script</title>
		<link>http://www.markdalby.com/php-post-to-twitter-and-append-content-to-140-chars/comment-page-1/#comment-4</link>
		<dc:creator>Mark Dalby Featured Uncategorized PHP Post to Twitter and append content to 140 chars. &#187; Auto Post Script</dc:creator>
		<pubDate>Tue, 06 Oct 2009 05:35:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.markdalby.com/?p=26#comment-4</guid>
		<description>[...] Just another WordPress weblog The below function will allow you to “Twit” to Twitter from your website. Your server must have CURL support for this to work. The function also limits the content to 140 chars and appends “…” to strings that are longer. &lt;?php # @purpose To post content to twitter # @param $content The content to post to twitter. (140 Chars Maximum) # @param $username Your Twitter username. # @param $password Your Twitter password. # @returns True or False # @changelog 14 / 03 / 2009 Function declared complete. # @docend function twit($content, $username, $password) { // The message you want to send. $message = substr($content, 0, strrpos(substr($content, 0, 140), ‘ ‘)) . ‘…’; // The twitter API address $url = ‘http://twitter.com/statuses/update.xml’; // Execute the query. $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, “$url”); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_handle, CURLOPT_POST, 1); curl_setopt($curl_handle, CURLOPT_POSTFIELDS, “status=$message”); curl_setopt($curl_handle, CURLOPT_USERPWD, “$username:$password”); $buffer = curl_exec($curl_handle); curl_close($curl_handle); // check for success or failure if (empty($buffer)) { return false; } else { return true; } } ?&gt; There is one comment for this post. A genius! Thank you so much for it. It’s now a part of my website. Sign up to receive latest news Download Free Article Spinner Thanks. [...]</description>
		<content:encoded><![CDATA[<p>[...] Just another WordPress weblog The below function will allow you to “Twit” to Twitter from your website. Your server must have CURL support for this to work. The function also limits the content to 140 chars and appends “…” to strings that are longer. &lt;?php # @purpose To post content to twitter # @param $content The content to post to twitter. (140 Chars Maximum) # @param $username Your Twitter username. # @param $password Your Twitter password. # @returns True or False # @changelog 14 / 03 / 2009 Function declared complete. # @docend function twit($content, $username, $password) { // The message you want to send. $message = substr($content, 0, strrpos(substr($content, 0, 140), ‘ ‘)) . ‘…’; // The twitter API address $url = ‘http://twitter.com/statuses/update.xml’; // Execute the query. $curl_handle = curl_init(); curl_setopt($curl_handle, CURLOPT_URL, “$url”); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl_handle, CURLOPT_POST, 1); curl_setopt($curl_handle, CURLOPT_POSTFIELDS, “status=$message”); curl_setopt($curl_handle, CURLOPT_USERPWD, “$username:$password”); $buffer = curl_exec($curl_handle); curl_close($curl_handle); // check for success or failure if (empty($buffer)) { return false; } else { return true; } } ?&gt; There is one comment for this post. A genius! Thank you so much for it. It’s now a part of my website. Sign up to receive latest news Download Free Article Spinner Thanks. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://www.markdalby.com/php-post-to-twitter-and-append-content-to-140-chars/comment-page-1/#comment-2</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Sun, 04 Oct 2009 18:40:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.markdalby.com/?p=26#comment-2</guid>
		<description>A genius! Thank you so much for it. It&#039;s now a part of my website.</description>
		<content:encoded><![CDATA[<p>A genius! Thank you so much for it. It&#8217;s now a part of my website.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

