<?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>Cake-Spoon.com &#187; PHP</title> <atom:link href="http://www.cake-spoon.com/cats/php/feed" rel="self" type="application/rss+xml" /><link>http://www.cake-spoon.com</link> <description>Internet playground of Sam Rudge</description> <lastBuildDate>Sun, 29 Aug 2010 01:12:00 +0000</lastBuildDate> <generator>http://wordpress.org/?v=2.9.2</generator> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Bunnycam Images</title><link>http://www.cake-spoon.com/475/bunnycam-images.php</link> <comments>http://www.cake-spoon.com/475/bunnycam-images.php#comments</comments> <pubDate>Mon, 14 Jun 2010 16:13:26 +0000</pubDate> <dc:creator>Sam Rudge</dc:creator> <category><![CDATA[HTML]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Randomz]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[Bunnycam]]></category> <category><![CDATA[Images]]></category><guid isPermaLink="false">http://www.cake-spoon.com/?p=475</guid> <description><![CDATA[A few images of the Bunnycam camera ]]></description> <content:encoded><![CDATA[<p>A few images of the Bunnycam camera</p><a href='http://www.cake-spoon.com/475/bunnycam-images.php/p1010387' title='P1010387'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/06/P1010387-150x150.jpg" class="attachment-thumbnail" alt="" title="P1010387" /></a> <a href='http://www.cake-spoon.com/475/bunnycam-images.php/p1010388' title='P1010388'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/06/P1010388-150x150.jpg" class="attachment-thumbnail" alt="" title="P1010388" /></a> <a href='http://www.cake-spoon.com/475/bunnycam-images.php/p1010389' title='P1010389'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/06/P1010389-150x150.jpg" class="attachment-thumbnail" alt="" title="P1010389" /></a> <a href='http://www.cake-spoon.com/475/bunnycam-images.php/p1010390' title='P1010390'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/06/P1010390-150x150.jpg" class="attachment-thumbnail" alt="" title="P1010390" /></a>]]></content:encoded> <wfw:commentRss>http://www.cake-spoon.com/475/bunnycam-images.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Introducing Bunnycam</title><link>http://www.cake-spoon.com/472/introducing-bunnycam.php</link> <comments>http://www.cake-spoon.com/472/introducing-bunnycam.php#comments</comments> <pubDate>Mon, 14 Jun 2010 11:14:28 +0000</pubDate> <dc:creator>Sam Rudge</dc:creator> <category><![CDATA[Flash]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Randomz]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[Bunnycam]]></category> <category><![CDATA[Telecontrol]]></category> <category><![CDATA[Webcam]]></category><guid isPermaLink="false">http://www.cake-spoon.com/?p=472</guid> <description><![CDATA[So for the last few days I&#8217;ve been working on installing a camera in my rabbits hutch as well as writing all the software to run it. I can now officially announce that Bunnycam is live at http://www.cake-spoon.com/cam It&#8217;s still kind-of BETA so report any bugs and please share it around =) Enjoy ]]></description> <content:encoded><![CDATA[<p>So for the last few days I&#8217;ve been working on installing a camera in my rabbits hutch as well as writing all the software to run it. I can now officially announce that Bunnycam is live at <a title="Bunnycam" href="http://www.cake-spoon.com/cam" target="_blank">http://www.cake-spoon.com/cam</a></p><p>It&#8217;s still kind-of BETA so report any bugs and please share it around =)<br /> Enjoy</p> ]]></content:encoded> <wfw:commentRss>http://www.cake-spoon.com/472/introducing-bunnycam.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Testing Rabbicam</title><link>http://www.cake-spoon.com/362/testing-rabbicam.php</link> <comments>http://www.cake-spoon.com/362/testing-rabbicam.php#comments</comments> <pubDate>Fri, 23 Apr 2010 12:52:44 +0000</pubDate> <dc:creator>Sam Rudge</dc:creator> <category><![CDATA[Graphic Design]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[Rabbciam]]></category> <category><![CDATA[Testing]]></category><guid isPermaLink="false">http://www.cake-spoon.com/?p=362</guid> <description><![CDATA[Some of you may or may not know that over the last few weeks I have been working on an interactive pan/tilt webcam in my rabbits hutch (See here). Today I have been testing all the software and I thought I would share a few screengrabs of the camera =) I&#8217;m hoping to put Rabbicam live [...]]]></description> <content:encoded><![CDATA[<p>Some of you may or may not know that over the last few weeks I have been working on an interactive pan/tilt webcam in my rabbits hutch (See <a href="http://www.cake-spoon.com/pdt/2010-03-23/rabbicam-is-coming" target="_blank">here</a>). Today I have been testing all the software and I thought I would share a few screengrabs of the camera =)</p><a href='http://www.cake-spoon.com/362/testing-rabbicam.php/screen-shot-2010-04-23-at-13-31-04' title='Screen shot 2010-04-23 at 13.31.04'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/04/Screen-shot-2010-04-23-at-13.31.04-150x150.png" class="attachment-thumbnail" alt="" title="Screen shot 2010-04-23 at 13.31.04" /></a> <a href='http://www.cake-spoon.com/362/testing-rabbicam.php/screen-shot-2010-04-23-at-13-32-23' title='Screen shot 2010-04-23 at 13.32.23'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/04/Screen-shot-2010-04-23-at-13.32.23-150x150.png" class="attachment-thumbnail" alt="" title="Screen shot 2010-04-23 at 13.32.23" /></a> <a href='http://www.cake-spoon.com/362/testing-rabbicam.php/screen-shot-2010-04-23-at-13-35-40' title='Screen shot 2010-04-23 at 13.35.40'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/04/Screen-shot-2010-04-23-at-13.35.40-150x150.png" class="attachment-thumbnail" alt="" title="Screen shot 2010-04-23 at 13.35.40" /></a> <a href='http://www.cake-spoon.com/362/testing-rabbicam.php/screen-shot-2010-04-23-at-13-35-51' title='Screen shot 2010-04-23 at 13.35.51'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/04/Screen-shot-2010-04-23-at-13.35.51-150x150.png" class="attachment-thumbnail" alt="" title="Screen shot 2010-04-23 at 13.35.51" /></a> <a href='http://www.cake-spoon.com/362/testing-rabbicam.php/screen-shot-2010-04-23-at-13-36-25' title='Screen shot 2010-04-23 at 13.36.25'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/04/Screen-shot-2010-04-23-at-13.36.25-150x150.png" class="attachment-thumbnail" alt="" title="Screen shot 2010-04-23 at 13.36.25" /></a> <a href='http://www.cake-spoon.com/362/testing-rabbicam.php/screen-shot-2010-04-23-at-13-36-36' title='Screen shot 2010-04-23 at 13.36.36'><img width="150" height="150" src="http://www.cake-spoon.com/wp-content/uploads/2010/04/Screen-shot-2010-04-23-at-13.36.36-150x150.png" class="attachment-thumbnail" alt="" title="Screen shot 2010-04-23 at 13.36.36" /></a><p>I&#8217;m hoping to put Rabbicam live within the next few weeks.<br /> Big thanks to @nathanknz for all his help and letting me use his mJPEG proxy script</p> ]]></content:encoded> <wfw:commentRss>http://www.cake-spoon.com/362/testing-rabbicam.php/feed</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Twitter Streaming API in the real world</title><link>http://www.cake-spoon.com/348/twitter-streaming-api-in-the-real-world.php</link> <comments>http://www.cake-spoon.com/348/twitter-streaming-api-in-the-real-world.php#comments</comments> <pubDate>Tue, 20 Apr 2010 20:33:07 +0000</pubDate> <dc:creator>Sam Rudge</dc:creator> <category><![CDATA[HTML]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Randomz]]></category> <category><![CDATA[Api]]></category> <category><![CDATA[Streaming]]></category> <category><![CDATA[Twitter]]></category><guid isPermaLink="false">http://www.cake-spoon.com/?p=348</guid> <description><![CDATA[ Overview:- A script running on the &#8220;Host&#8221; computer is linked in with Daslight  Virtual Controller. A USB interface links Daslight to a single, RGB,  DMX theatrical spot light capable of producing over 1,500 unique colors.  The script searches the Twitter API for the terms &#8216;Red&#8217;, &#8216;Green&#8217; or  &#8216;Blue&#8217;. Any tweets containing these [...]]]></description> <content:encoded><![CDATA[<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="670" height="407" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/hcclgdfQeAA%2Em4v" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="670" height="407" src="http://blip.tv/play/hcclgdfQeAA%2Em4v" allowfullscreen="true"></embed></object></p><h1>Overview:-</h1><p>A script running on the &#8220;Host&#8221; computer is linked in with Daslight  Virtual Controller. A USB interface links Daslight to a single, RGB,  DMX theatrical spot light capable of producing over 1,500 unique colors.  The script searches the Twitter API for the terms &#8216;Red&#8217;, &#8216;Green&#8217; or  &#8216;Blue&#8217;. Any tweets containing these words are displayed on the prompt  and link to Daslight triggering the relevant scene thereby lighting the  fixture in that color. If a tweet contains more than one color then both  scenes will be triggered causing other colors such as orange and purple  to be created.<br /> The script is written in PHP, linked in to the  Daslight dashard.dll interface to trigger scenes within the software.<br /> This  project was inspired by a project called &#8216;Blink&#8217; by Nathan Kennedy:<br /> <a title="http://kturl.com/blink" dir="ltr" rel="nofollow" href="http://kturl.com/blink" target="_blank">http://kturl.com/blink</a><br /> <a title="http://kturl.com/www" dir="ltr" rel="nofollow" href="http://kturl.com/www" target="_blank">http://kturl.com/www</a></p><h1>Source:-</h1><pre name="code" class="php">
&lt;?php
//datacollector.php
function run($tt) {
exec('C:/daslight/dashard.dll -k '.$tt.'');
}
echo "Waiting...";
sleep(30);
$fp = fopen("http://Username:Password@stream.twitter.com/1/statuses/filter.json?track=red,green,blue","r");
while($data = fgets($fp))
{
$json = json_decode($data);
if ( preg_match('/\bred\b/i', $json -&gt; text) == true ) {
echo "Red - ".$json -&gt; text."\n";
run('r');
} else if ( preg_match('/\bblue\b/i', $json -&gt; text) == true ) {
echo "Blue - ".$json -&gt; text."\n";
run('b');
} else if ( preg_match('/\bgreen\b/i', $json -&gt; text) == true ) {
echo "Green - ".$json -&gt; text."\n";
run('g');
} else {
echo "None!\n";
}
}
?&gt;
</pre><p>Enjoy =)</p> ]]></content:encoded> <wfw:commentRss>http://www.cake-spoon.com/348/twitter-streaming-api-in-the-real-world.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>XPPY &#8211; A Multi-URL shortener</title><link>http://www.cake-spoon.com/328/xppy-a-multi-url-shortener.php</link> <comments>http://www.cake-spoon.com/328/xppy-a-multi-url-shortener.php#comments</comments> <pubDate>Sun, 11 Apr 2010 16:36:47 +0000</pubDate> <dc:creator>Sam Rudge</dc:creator> <category><![CDATA[Graphic Design]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[For]]></category> <category><![CDATA[Service]]></category> <category><![CDATA[Shortening]]></category> <category><![CDATA[Twitter]]></category> <category><![CDATA[URL]]></category> <category><![CDATA[XPPY]]></category><guid isPermaLink="false">http://www.cake-spoon.com/?p=328</guid> <description><![CDATA[So I just launched a new site &#8211; XPPY.net Its a URL shortening service for Twitter that allows you to shorten multiple URLs into a single link, thus saving you characters in your tweets and making it easier to send multiple links. The site is still in its BETA stages but it has many features including [...]]]></description> <content:encoded><![CDATA[<p>So I just launched a new site &#8211; <a href="http://xppy.net/" target="_blank">XPPY.net<br /> </a>Its a URL shortening service for Twitter that allows you to shorten multiple URLs into a single link, thus saving you characters in your tweets and making it easier to send multiple links. The site is still in its BETA stages but it has many features including a powerful API for use in your projects.<br /> Want to see how XPPY works? <a href="http://xppy.net/4" target="_blank">Click here</a> to open multiple web pages from one link.</p><p>Enjoy =)</p> ]]></content:encoded> <wfw:commentRss>http://www.cake-spoon.com/328/xppy-a-multi-url-shortener.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Rabbicam Is Coming!!!!!</title><link>http://www.cake-spoon.com/278/rabbicam-is-coming.php</link> <comments>http://www.cake-spoon.com/278/rabbicam-is-coming.php#comments</comments> <pubDate>Tue, 23 Mar 2010 09:35:13 +0000</pubDate> <dc:creator>Sam Rudge</dc:creator> <category><![CDATA[HTML]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Randomz]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[Live]]></category> <category><![CDATA[Rabbicam]]></category> <category><![CDATA[Stream]]></category> <category><![CDATA[Video]]></category> <category><![CDATA[Webcam]]></category><guid isPermaLink="false">http://www.cake-spoon.com/?p=278</guid> <description><![CDATA[As you will see from the endless blurb on the About page. I used to run something called GPC which was a webcam pointed at my guinea pigs so you could see them going about their guinea pig business (Mostly eating and sleeping). I decided that I wanted to bring back the live webcam so [...]]]></description> <content:encoded><![CDATA[<p>As you will see from the endless blurb on the <a href="/about">About</a> page. I used to run something called GPC which was a webcam pointed at my guinea pigs so you could see them going about their guinea pig business (Mostly eating and sleeping). I decided that I wanted to bring back the live webcam so I present to you my new idea&#8230;</p><h1>RABBICAM!!!</h1><p>For those of you who are not familiar with the concept of words, this is going to be a live webcam pointed at my rabbit. But its going to be better than that. I have bought an outdoor, wireless, night vision, pan/tilt/zoom IP camera and I&#8217;m going to give YOU control over it. If the first camera is successful I will be looking to install some more static cameras that will also be accessible from the internet as well as possibly setting up an indoor IP camera for my guinea pigs and a couple of other cameras on random things I think might be interesting =)</p> ]]></content:encoded> <wfw:commentRss>http://www.cake-spoon.com/278/rabbicam-is-coming.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>NEW PLUGIN THINGY!!!</title><link>http://www.cake-spoon.com/221/new-plugin-thingy.php</link> <comments>http://www.cake-spoon.com/221/new-plugin-thingy.php#comments</comments> <pubDate>Sat, 13 Mar 2010 15:59:58 +0000</pubDate> <dc:creator>Sam Rudge</dc:creator> <category><![CDATA[HTML]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Web Design]]></category> <category><![CDATA[Api]]></category> <category><![CDATA[Gdata]]></category> <category><![CDATA[Plugin]]></category> <category><![CDATA[Wordpress]]></category> <category><![CDATA[WP-Tube]]></category> <category><![CDATA[Youtube]]></category><guid isPermaLink="false">http://www.cake-spoon.com/?p=221</guid> <description><![CDATA[A while ago I had wanted to make a Wordpress plugin that automatically got videos from Youtube using the API and put them into a Wordpress blog feed but I never got round to it. Recently however my friend posted this tweet and so I decided that I might actually get of my ass and [...]]]></description> <content:encoded><![CDATA[<p>A while ago I had wanted to make a Wordpress plugin that automatically got videos from Youtube using the API and put them into a Wordpress blog feed but I never got round to it. Recently however my friend posted <a href="http://twitter.com/AlanDistro/status/10334871871" target="_blank">this</a> tweet and so I decided that I might actually get of my ass and develop it. It didn&#8217;t take as long as I had expected and was finished within a couple of days and now its up on the Wordpress.org extensions directory as well as the SVN. You can read more about the plug-in and get it from<br /> <a href="http://www.cake-spoon.com/wp-tube">http://www.cake-spoon.com/wp-tube</a></p><p>Enjoy =)</p> ]]></content:encoded> <wfw:commentRss>http://www.cake-spoon.com/221/new-plugin-thingy.php/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced)
Database Caching 5/20 queries in 0.015 seconds using disk

Served from: www.cake-spoon.com @ 2010-09-05 06:01:53 -->