<?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>Seichleon</title>
	<atom:link href="http://seich.martianwabbit.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://seich.martianwabbit.com</link>
	<description>Legendarido...</description>
	<lastBuildDate>Wed, 23 Jun 2010 20:05:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>The Anual MWPS ReDesign.</title>
		<link>http://seich.martianwabbit.com/the-anual-mwps-redesign/</link>
		<comments>http://seich.martianwabbit.com/the-anual-mwps-redesign/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 19:07:52 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=218</guid>
		<description><![CDATA[Hello everyone. Just like every year, I&#8217;ve updated the site with some random stuff I wanted to experiment with. The new site uses a color scheme based off the one I use on my notepad x] Monokai. The colors are shinny and has a bunch of nice rounded edges. If you are using any browser [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone. Just like every year, I&#8217;ve updated the site with some random stuff I wanted to experiment with. The new site uses a color scheme based off the one I use on my notepad x] Monokai. The colors are shinny and has a bunch of nice rounded edges. If you are using any browser but chrome you probably already noticed something about the site. Yeah, I am talking about the sign sayign that your browser isn&#8217;t supported. Well this doesn&#8217;t mean that there&#8217;s something wrong with your browser(unless we are talking about IE here). It is just the basic of my new approach for my <span style="text-decoration: underline;">personal</span> projects. I&#8217;ll be making a post later today or tommorow to further explain the concept. Basically I am no longer designing for the web. I am designing for my browser of choice. In this case, chrome being my default browser, was my platform of choice.</p>
<p>Well Basically, I made my website and used webkit prefixes (so I guess it will also display nicely on safari) and made my website without any consideration for other browser. I am using html5 and ccs3 features which wont work on other browsers but instead of graceful degradation I simply placed a sign saying that my site isn&#8217;t design with any other browser in mind but chrome. This way, I can spend more time on details instead on bug fixes. Of course, this is just an experiment, any other thing than my personal projects won&#8217;t be doing such a thing. I also took graceful degradation in mind on the new page for the jQuery Quickbar which will actually display correctly in IE and most browsers out there. If you have any ideas please let me know, or you can also wait for my full explanation on this matter. Atm lets get back to the new website.</p>
<p>The new websites lacks any kind of images and is very shinny. The most important aspect of this new design is that for the first time I made a wordpress theme to integrate the blog and the website, this way they both look the same and look better when used to together. Unless you are paying close attention you won&#8217;t really notice that your the blog is on a subdomain of the actual webpage and that the blog unlike the webpage isn&#8217;t using wordpress or any kind of cms.</p>
<p>Overall this is a boring website it took less than 7 hours to be completed so I guess I&#8217;ll be making a second one later on this year, depending on my mood. This is the first wordpress theme I ever made, so I&#8217;ll be upgrading it constantly because, I left a lot of random stuff without consideration and is probably really buggy.</p>
<p>I hope you like the website. I&#8217;ll work on a better one this year.</p>
<h3>Some Screenshots&#8230;</h3>

<a href='http://seich.martianwabbit.com/the-anual-mwps-redesign/download-1/' title='The Portfolio!'><img width="150" height="150" src="http://seich.martianwabbit.com/wp-content/uploads/2010/06/download-1-150x150.png" class="attachment-thumbnail" alt="The Portfolio!" title="The Portfolio!" /></a>
<a href='http://seich.martianwabbit.com/the-anual-mwps-redesign/download-2/' title='The New Homepage ;O'><img width="150" height="150" src="http://seich.martianwabbit.com/wp-content/uploads/2010/06/download-2-150x150.png" class="attachment-thumbnail" alt="The New Homepage ;O" title="The New Homepage ;O" /></a>
<a href='http://seich.martianwabbit.com/the-anual-mwps-redesign/download/' title='The Blog!'><img width="150" height="150" src="http://seich.martianwabbit.com/wp-content/uploads/2010/06/download-150x150.png" class="attachment-thumbnail" alt="The Blog!" title="The Blog!" /></a>

]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/the-anual-mwps-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quickbar Updated.</title>
		<link>http://seich.martianwabbit.com/quickbar-updated/</link>
		<comments>http://seich.martianwabbit.com/quickbar-updated/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 18:50:56 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=214</guid>
		<description><![CDATA[Hello everyone, it&#8217;s been a while since I wrote an entry for the last time. This time I am just making a quick and unimportant announcement. I&#8217;ve updated the jQuery QuickBar to version 1.1 it has several bug fixes and works better overall. Most of the issues I address were small errors which were pretty stupid [...]]]></description>
			<content:encoded><![CDATA[<p>Hello everyone, it&#8217;s been a while since I wrote an entry for the last time. This time I am just making a quick and unimportant announcement. I&#8217;ve updated the jQuery QuickBar to version 1.1 it has several bug fixes and works better overall. Most of the issues I address were small errors which were pretty stupid and I hadn&#8217;t fixed because I tend to let my projects die unfinished. You can now plug this url to your document:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a> <span style="color: #000066;">src</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;http://mwps-jquery-plugins.googlecode.com/svn/trunk/jquery.QuickBar.js&quot;</span>&gt;&lt;<span style="color: #66cc66;">/</span><a href="http://december.com/html/4/element/script.html"><span style="color: #000000; font-weight: bold;">script</span></a>&gt;</span></div></td></tr></tbody></table></div>
<p>That way you&#8217;ll be able to use it from a self-updating centralized location and you won&#8217;t waste any bandwidth on it. I&#8217;ll probably be adding a minified or packaged version later on when I feel like it. Sorry.</p>
<p>Everything else remains the same check out this <a title="Quickbar" href="http://www.martianwabbit.com/Scripts/MWPS%20QuickBar/" target="_self">page</a> to check out the examples and the general documentation. I&#8217;ll probably be making further upgrades since the code is old and it has many flaws I&#8217;ve already spotted but haven&#8217;t addressed (most of this flaws aren&#8217;t really important to anyone but myself x]).</p>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/quickbar-updated/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing PHP on your computer&#8230;</title>
		<link>http://seich.martianwabbit.com/installing-php-on-your-computer/</link>
		<comments>http://seich.martianwabbit.com/installing-php-on-your-computer/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 06:43:14 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=206</guid>
		<description><![CDATA[Okay, so you are probably wondering what&#8217;s required to start working with PHP. Well there isn&#8217;t much to it. In the following video I&#8217;ll cover the installation of EasyPHP a WAMP( Windows + Apache + Mysql + PHP) solution with a pretty straight forward installation. Please notice that I use windows for my php development [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so you are probably wondering what&#8217;s required to start working with PHP. Well there isn&#8217;t much to it. In the following video I&#8217;ll cover the installation of EasyPHP a WAMP( Windows + Apache + Mysql + PHP) solution with a pretty straight forward installation.</p>
<p><embed src="http://blip.tv/play/haEEgcq5OAA%2Em4v" type="application/x-shockwave-flash" width="400" height="294" allowscriptaccess="always" allowfullscreen="true"></embed></p>
<p>Please notice that I use windows for my php development screencasts. If you are using linux or Mac Os you&#8217;ll need to install their respective software bundles. I recommend you check the following links.</p>
<p>Mac Os: <a href="http://www.mamp.info/en/index.html">http://www.mamp.info/en/index.html</a></p>
<p>Linux(Ubuntu): <a href="http://www.howtoforge.com/ubuntu_lamp_for_newbies">http://www.howtoforge.com/ubuntu_lamp_for_newbies</a></p>
<p>Feel free to ask any question you may have, I gladly answer them ASAP.</p>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/installing-php-on-your-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How PHP works</title>
		<link>http://seich.martianwabbit.com/how-php-works/</link>
		<comments>http://seich.martianwabbit.com/how-php-works/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 03:19:47 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Screencast]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[php Tutorial]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=198</guid>
		<description><![CDATA[Okay, this won&#8217;t be of much help to everyone but those following my new screencast series about PHP.  I&#8217;ll be going over the basics and I thought that this would be the best place to start on. &#8220;How PHP works&#8221; shows in about a minute the basic functionality of PHP. I&#8217;ll be going over setting [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, this won&#8217;t be of much help to everyone but those following my new screencast series about PHP.  I&#8217;ll be going over the basics and I thought that this would be the best place to start on. &#8220;How PHP works&#8221; shows in about a minute the basic functionality of PHP. I&#8217;ll be going over setting PHP up in your PC afterwards and then I&#8217;ll start showing the basics of PHP. Hopefully this screencast series will give me a reason to be more active on my blog.</p>
<p><embed src="http://blip.tv/play/haEEgcfCfAA%2Em4v" type="application/x-shockwave-flash" width="400" height="294" allowscriptaccess="always" allowfullscreen="true"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/how-php-works/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ceica Pastebin</title>
		<link>http://seich.martianwabbit.com/ceica-pastebin/</link>
		<comments>http://seich.martianwabbit.com/ceica-pastebin/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 04:45:18 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=186</guid>
		<description><![CDATA[I&#8217;ve finally completed (sort of) a project. I created the Ceica Pastebin based upon the idea of pastebin.com. I really liked the idea behind it and thought it would be something really cool to script. Just as I predicted I had a great time doing it. It&#8217;s fully functional except for the API I am [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve finally completed (sort of) a project. I created the <a href="http://bin.martianwabbit.com">Ceica Pastebin</a> based upon the idea of pastebin.com. I really liked the idea behind it and thought it would be something really cool to script. Just as I predicted I had a great time doing it. It&#8217;s fully functional except for the API I am planning on releasing. The way everything runs should be able to handle extreme quantities of traffic and usage that it won&#8217;t be getting so I can rely on my server not crashing. I really love how it turned out and I think my implementation is really elegant. It&#8217;s opensource by request so if you want to take a look at it feel free to ask for a copy by contacting me. I would personally download pastebin.com&#8217;s script as it&#8217;s been developed way more than my 7hour project. I&#8217;ll be improving it and I have plans for several desktop applications to help provide a smoother connection between the user and the service.</p>
<p>I still have many ideas I would like to develop. Like user registration with features like keeping track of posts and link emailing. I am still thinking on ways to improve it. I will also redesign it&#8217;s ui as it isn&#8217;t nice enough. I hope it&#8217;s useful for someone and that it actually gets used.  <a href="http://martianwabbit.com/about.html">Contact me</a> if you have any doubt or if you spot any bug. Please comment about it xD.</p>
<p><a href="http://bin.martianwabbit.com"><img class="alignnone size-medium wp-image-187" title="Ceica PasteBin_1255919077675" src="http://seich.martianwabbit.com/wp-content/uploads/2009/10/Ceica-PasteBin_1255919077675-300x186.png" alt="Ceica PasteBin_1255919077675" width="300" height="186" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/ceica-pastebin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Simple Twitter PHP Class</title>
		<link>http://seich.martianwabbit.com/building-a-simple-twitter-php-class/</link>
		<comments>http://seich.martianwabbit.com/building-a-simple-twitter-php-class/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 22:01:55 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[php Tutorial]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=149</guid>
		<description><![CDATA[PHP is a very versatile scripting language. In this tutorial I will be explaining how to create a PHP class that will help you post and get information from a twitter account using the client URL library (cURL). Tutorial Details Program: PHP/Twitter API Version: 1 Difficulty: Easy Estimated Completion Time: 10 minutes Step 1 &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://seich.martianwabbit.com/wp-content/uploads/2009/08/preview.jpg"><img class="alignnone size-full wp-image-150" title="preview" src="http://seich.martianwabbit.com/wp-content/uploads/2009/08/preview.jpg" alt="preview" width="200" height="200" /></a></p>
<p>PHP is a very versatile scripting language. In this tutorial I will be explaining how to create a PHP class that will help you post and get information from a twitter account using the client URL library (cURL).</p>
<p><span id="more-149"></span></p>
Note: There is a file embedded within this post, please visit this post to download the file.
<h3>Tutorial Details</h3>
<ul>
<li><strong>Program:</strong> PHP/Twitter API</li>
<li><strong>Version:</strong> 1</li>
<li><strong>Difficulty:</strong> Easy</li>
<li><strong>Estimated Completion Time:</strong> 10 minutes</li>
</ul>
<h3>Step 1 &#8211; Starting up</h3>
<p>Let&#8217;s begin. First, we will create a file named twit.php which will contain our class. Once created, we declare our class and name it twit.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000000; font-weight: bold;">class</span> twit <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//define class &quot;twit&quot;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<h3>Step 2 &#8211; The Constructor</h3>
<p>We will now add our class&#8217;s public variables and its constructor. The constructor is a special function that will be run when we create a new instance of the class.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000000; font-weight: bold;">class</span> twit <span style="color: #009900;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$username</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$password</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">username</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$username</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">password</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$password</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>Now we have defined the two variables that we will be using throughout the class. These will be defined when a new instance of the class is created, thanks to our __construct method.</p>
<h3>Step 3 &#8211; Posting</h3>
<p>It&#8217;s time to define our first method.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000000; font-weight: bold;">class</span> twit <span style="color: #009900;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$username</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$password</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">username</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$username</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">password</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$password</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> postStatus<span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweet</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_init"><span style="color: #990000;">curl_init</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//initiate curl session.</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://www.twitter.com/statuses/update.xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//set URL to connect to.</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_CONNECTTIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//set mode to POST.</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;status=&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/urlencode"><span style="color: #990000;">urlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweet</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//send status information.</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_USERPWD<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$this-&gt;username</span>:<span style="color: #006699; font-weight: bold;">$this-&gt;password</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//send login information.</span><br />
<br />
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_exec"><span style="color: #990000;">curl_exec</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//execute curl session.</span><br />
<span style="color: #000088;">$http_status</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_getinfo"><span style="color: #990000;">curl_getinfo</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLINFO_HTTP_CODE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//get response code.</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$http_status</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #666666; font-style: italic;">//200 means the post was succesful.</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<a href="http://www.php.net/curl_close"><span style="color: #990000;">curl_close</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//close curl connection.</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>The postStatus method will be used to tweet directly to our account, to achieve this we use the cURL to post using twitter&#8217;s api. The setup is simple and configured as specified on the twitter api page. The method returns true or false based upon the response code sent back from twitter this, makes the class easier to be used within another page in order to display success/error messages or trigger some other action.</p>
<p>Let&#8217;s try our class and see what we have so far.<br />
Create another php file and try the following code in it. Make sure to replace USER and PASSWORD with your twitter username and password.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;twit.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$twitter</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> twit<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;USER&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;PASSWORD&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//replace these</span><br />
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$twitter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">postStatus</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Test!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Status Posted!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;There was an error when posting the status to twitter.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>If everything is working correctly you should see the post on your twitter account and it should appear as posted through the API.</p>
<p><a href="http://seich.martianwabbit.com/wp-content/uploads/2009/08/1.jpg"><img class="alignnone size-full wp-image-156" title="1" src="http://seich.martianwabbit.com/wp-content/uploads/2009/08/1.jpg" alt="1" width="600" height="80" /></a></p>
<h3>Step 4 &#8211; Getting</h3>
<p>Finally, we will define our second and last method which, is going to help us get the information of our last twitter status.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br />13<br />14<br />15<br />16<br />17<br />18<br />19<br />20<br />21<br />22<br />23<br />24<br />25<br />26<br />27<br />28<br />29<br />30<br />31<br />32<br />33<br />34<br />35<br />36<br />37<br />38<br />39<br />40<br />41<br />42<br />43<br />44<br />45<br />46<br />47<br />48<br />49<br />50<br />51<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #000000; font-weight: bold;">class</span> twit <span style="color: #009900;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$username</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$password</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$username</span><span style="color: #339933;">,</span> <span style="color: #000088;">$password</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">username</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$username</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">password</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$password</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> postStatus<span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweet</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_init"><span style="color: #990000;">curl_init</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://www.twitter.com/statuses/update.xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_CONNECTTIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POST<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_POSTFIELDS<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;status=&quot;</span><span style="color: #339933;">.</span><a href="http://www.php.net/urlencode"><span style="color: #990000;">urlencode</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweet</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_USERPWD<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$this-&gt;username</span>:<span style="color: #006699; font-weight: bold;">$this-&gt;password</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_exec"><span style="color: #990000;">curl_exec</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$http_status</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_getinfo"><span style="color: #990000;">curl_getinfo</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLINFO_HTTP_CODE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$http_status</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<a href="http://www.php.net/curl_close"><span style="color: #990000;">curl_close</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> getStatus<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #000088;">$ch</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_init"><span style="color: #990000;">curl_init</span></a><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_URL<span style="color: #339933;">,</span> <span style="color: #0000ff;">'http://twitter.com/statuses/user_timeline/'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">username</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'.xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//set url to the user's timeline.</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_VERBOSE<span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_RETURNTRANSFER<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_USERPWD<span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;<span style="color: #006699; font-weight: bold;">$this-&gt;username</span>:<span style="color: #006699; font-weight: bold;">$this-&gt;password</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_HTTP_VERSION<span style="color: #339933;">,</span> CURL_HTTP_VERSION_1_1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_CONNECTTIMEOUT<span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/curl_setopt"><span style="color: #990000;">curl_setopt</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLOPT_GET<span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//set mode to get.</span><br />
<br />
<span style="color: #000088;">$result</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_exec"><span style="color: #990000;">curl_exec</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$http_status</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/curl_getinfo"><span style="color: #990000;">curl_getinfo</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #339933;">,</span> CURLINFO_HTTP_CODE<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<a href="http://www.php.net/curl_close"><span style="color: #990000;">curl_close</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ch</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$http_status</span> <span style="color: #339933;">!=</span> <span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000088;">$resultArray</span> <span style="color: #339933;">=</span> <a href="http://www.php.net/simplexml_load_string"><span style="color: #990000;">simplexml_load_string</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//load the result into a simplexml object.</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #000088;">$resultArray</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">status</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//return object.</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></td></tr></tbody></table></div>
<p>This time we will be using the cURL&#8217;s get option, which will allow us to get the information from the twitter server.<br />
In this method I am using a simplexml object to make the task of managing information easier, since we will be receiving a lot of data from the server.</p>
<p>Let&#8217;s try the new method out! Create a new PHP file and insert the following code into it. Once again, make sure to replace USER and PASSWORD with your corresponding twitter username and password.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;twit.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$twitter</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> twit<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;USER&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;PASSWORD&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><span style="color: #666666; font-style: italic;">//replace these</span><br />
<span style="color: #000088;">$tweeter2</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$tweeter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getStatus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://www.php.net/var_dump"><span style="color: #990000;">var_dump</span></a><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweeter2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<div class="tutorial_image"><a href="http://seich.martianwabbit.com/wp-content/uploads/2009/08/2.jpg"><img class="alignnone size-full wp-image-157" title="2" src="http://seich.martianwabbit.com/wp-content/uploads/2009/08/2.jpg" alt="2" width="600" height="213" /></a></div>
<p>You will get a lot of data, but since it&#8217;s stored in a simplexml object it is quite easy to manipulate it.<br />
For example, if you wanted to get the text from your last post you could use:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br /></div></td><td><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<span style="color: #b1b100;">require</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;twit.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000088;">$tweeter</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> twit<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Seich&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;password&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">echo</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tweeter</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getStatus</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></td></tr></tbody></table></div>
<p>Which would echo whatever you wrote in your last update. Using this same method you can access all of the data provided.</p>
<h3>Conclusion</h3>
<p>Twitter&#8217;s API is quite easy to manipulate. It is a very repetitive task though, so an object-oriented approach can help us making the process easier. Using these two methods as example, you should be able to expand the class or create your own approach to it. Nevertheless you should now be able to play with the Twitter API and manipulate Twitter&#8217;s data.</p>
<h3>Further reading</h3>
<p>I would recommend reading these in order to get a deeper view of what we covered in this tutorial.</p>
<ul>
<li><a href="http://php.net/curl">PHP Client URL Library Manual</a></li>
<li><a href="http://apiwiki.twitter.com/">Twitter API Wiki</a></li>
<li><a href="http://php.net/simplexml">PHP SimpleXML Object Manual</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/building-a-simple-twitter-php-class/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Learning Photoshop Keys, MWPS Style</title>
		<link>http://seich.martianwabbit.com/learning-photoshop-keys-mwps-style/</link>
		<comments>http://seich.martianwabbit.com/learning-photoshop-keys-mwps-style/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 05:59:09 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[CheatBoard]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=144</guid>
		<description><![CDATA[Okay, so recently I decided that I will start posting on this blog more frequently as well as, increasing the quality of the content and that stuff. Today I was busy memorizing Photoshop keys. Mainly because, I&#8217;ve used photoshop for quite a while and never learned all of the basic tool keys. After googling &#8220;photoshop [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so recently I decided that I will start posting on this blog more frequently as well as, increasing the quality of the content and that stuff. Today I was busy memorizing Photoshop keys. Mainly because, I&#8217;ve used photoshop for quite a while and never learned all of the basic tool keys. After googling &#8220;photoshop cheatsheet&#8221; I found out that the only acceptable one is both not a sheet and useless for this purpose. Thus, I started a quest and began designing a basic image to help me with this purpose.I decided that one that resembled the keyboard layout would be the easiest to follow and that originated it&#8217;s appearance. Took around 30mins to make. I am still planning some improvements and, I might transform it into a full cheatsheet. I don&#8217;t know yet. Here it is:</p>
<div id="attachment_146" class="wp-caption aligncenter" style="width: 710px"><a href="http://seich.martianwabbit.com/wp-content/uploads/2009/07/ps-keyboard.png"><img class="size-full wp-image-146" title="ps-keyboard" src="http://seich.martianwabbit.com/wp-content/uploads/2009/07/ps-keyboard.png" alt="Photoshop Hotkey Map." width="700" height="217" /></a><p class="wp-caption-text">Photoshop Hotkey Map.</p></div>
<p>I already started using it and it actually made learning these easier. <img src='http://seich.martianwabbit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  please comment if you like it and if you don&#8217;t still do so.</p>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/learning-photoshop-keys-mwps-style/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The annual MWPS revamp.</title>
		<link>http://seich.martianwabbit.com/the-annual-mwps-revamp/</link>
		<comments>http://seich.martianwabbit.com/the-annual-mwps-revamp/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 15:41:15 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[MWPS]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=136</guid>
		<description><![CDATA[Okay after 3 days of hard work (not so hard actually) I&#8217;ve made a very nice new face for Martian Wabbit Productions. This time I am no longer presenting myself as the design firm I&#8217;ve been over the past years instead, I&#8217;ve restructured what MWPS is. It will still act as a brand but, instead [...]]]></description>
			<content:encoded><![CDATA[<p>Okay after 3 days of hard work (not so hard actually) I&#8217;ve made a very nice new face for Martian Wabbit Productions. This time I am no longer presenting myself as the design firm I&#8217;ve been over the past years instead, I&#8217;ve restructured what MWPS is. It will still act as a brand but, instead of representing the company, it will represent me and what will me and my company (Martian Wabbit Productions)  be. I love what the result ended up being. It is in it&#8217;s pure form a sketch. This is the first website I&#8217;ve placed this kind of effort into. The development process (was inspired by my friend Edward) was basically drawing as much as I could in a piece of paper then, I would scan it, change the brightness and contrast of the scanned paper. Clean the scan as much as possible and then optimize it for the web. It ended up being pretty neat and sketchy. I also made a nice brush set out of it (I will be uploading this one later on) which, allowed me to reuse my previous drawing.</p>
<p>The content is basically the same format as the old site but, it&#8217;s theme is different. I am no longer looking for a job but showing everyone who comes into the site who am I and what I do. The portfolio is the only page that I think is missing stuff so, I will be editing it later on. I will be adding information about the presented project and my other projects as well. The about page is probably the most unprofessional part of the page (which is what I am looking for with the general look of the new site). It features no about me info and, I actually slashed that through. I wrote contact me next to it so I could fix the identity issue <img src='http://seich.martianwabbit.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  and developed a nice web form.  It&#8217;s powered with ajax and features real-time field value checking and Ajax submit, on the back-end I have a simple and very well structured php script. This script basically double checks the submitted information and emails it to me (It also features some anti-spam technology of mine <img src='http://seich.martianwabbit.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> ). I am only missing my custom-made matching wordpress theme (which I am already working on) so you should see a change in the blog if you come on later this week <img src='http://seich.martianwabbit.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>That&#8217;s basically it. I also customized my 404 error pages <img src='http://seich.martianwabbit.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . I also made this image to give you a tour.</p>
<div id="attachment_140" class="wp-caption aligncenter" style="width: 434px"><a href="http://seich.martianwabbit.com/wp-content/uploads/2009/07/mwps2009.gif"><img class="size-full wp-image-140" title="mwps2009" src="http://seich.martianwabbit.com/wp-content/uploads/2009/07/mwps2009.gif" alt="MWPS 2009 Site Tour" width="424" height="800" /></a><p class="wp-caption-text">MWPS 2009 Site Tour</p></div>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/the-annual-mwps-revamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firefox 3.5 Released</title>
		<link>http://seich.martianwabbit.com/firefox-35-released/</link>
		<comments>http://seich.martianwabbit.com/firefox-35-released/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 17:05:58 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=126</guid>
		<description><![CDATA[Yes people it is true. I am not joking or anything. I wouldn&#8217;t joke with something like this&#8230; The new firefox is out and it is the  best firefox yet. Go check it out:http://www.mozilla.com/en-US/firefox/firefox.html I am already loving it I would recommend checking this video out, as it gives you an insight of what&#8217;s new with [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://seich.martianwabbit.com/wp-content/uploads/2009/07/167662-firefox-35_original.jpg"><img class="size-full wp-image-132 alignleft" title="167662-firefox-35_original" src="http://seich.martianwabbit.com/wp-content/uploads/2009/07/167662-firefox-35_original.jpg" alt="167662-firefox-35_original" width="180" height="211" /></a></p>
<p>Yes people it is true. I am not joking or anything. I wouldn&#8217;t joke with something like this&#8230; The new firefox is out and it is the  best firefox yet. Go check it out:<a href="http://www.mozilla.com/en-US/firefox/firefox.html">http://www.mozilla.com/en-US/firefox/firefox.html</a></p>
<p>I am already loving it <img src='http://seich.martianwabbit.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>I would recommend checking this <a href="http://www.mozilla.com/en-US/firefox/video/" target="_blank">video</a> out, as it gives you an insight of what&#8217;s new with this firefox build.</p>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/firefox-35-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Air</title>
		<link>http://seich.martianwabbit.com/adobe-air/</link>
		<comments>http://seich.martianwabbit.com/adobe-air/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 21:00:13 +0000</pubDate>
		<dc:creator>Seich</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://seich.martianwabbit.com/?p=118</guid>
		<description><![CDATA[Lately, I&#8217;ve been extremely bored. I&#8217;ve been searching for some sort of project related to programming but, I&#8217;ve been unable to get any idea I feel like working on. Yesterday, something changed though, now I have a very minimal idea. I will be using Adobe Air as my platform and try to develop some app I still [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://seich.martianwabbit.com/wp-content/uploads/2009/06/air_20080225162906.jpg"><img class="alignleft size-full wp-image-119" title="Adobe Air" src="http://seich.martianwabbit.com/wp-content/uploads/2009/06/air_20080225162906.jpg" alt="Adobe Air" width="100" height="100" /></a>Lately, I&#8217;ve been extremely bored. I&#8217;ve been searching for some sort of project related to programming but, I&#8217;ve been unable to get any idea I feel like working on. Yesterday, something changed though, now I have a very minimal idea. I will be using Adobe Air as my platform and try to develop some app I still have to think of. Basically, I&#8217;ve only discovered what I want to use as a Platform, I am still in the search for the real app idea though.  I was thinking on making some sort of notepad, or maybe something to check my Facebook friend&#8217;s status and update mine but, I am not sure yet. I might just make a little program to tweet. If anyone has any idea feel free to comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://seich.martianwabbit.com/adobe-air/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
