<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>O l i v e r &#160; D o w l i n g &#187; Programming</title>
	<atom:link href="http://oliverdowling.wordpress.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://oliverdowling.wordpress.com</link>
	<description>Software Developer &#124; Web Developer &#124; Tutor &#124; Human</description>
	<lastBuildDate>Thu, 30 Apr 2009 22:24:39 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='oliverdowling.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/19637c909329ff988bb75b55e6f8d6e8?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>O l i v e r &#160; D o w l i n g &#187; Programming</title>
		<link>http://oliverdowling.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://oliverdowling.wordpress.com/osd.xml" title="O l i v e r &nbsp; D o w l i n g" />
		<item>
		<title>Installing Thrift on Mac OS X</title>
		<link>http://oliverdowling.wordpress.com/2009/05/01/installing-thrift-on-mac-os-x/</link>
		<comments>http://oliverdowling.wordpress.com/2009/05/01/installing-thrift-on-mac-os-x/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 21:40:08 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://oliverdowling.wordpress.com/?p=149</guid>
		<description><![CDATA[First, Thrift requires Boost, which is not included in OS X by default. Go to the Boost site and download the latest version. Unzip and open Terminal for that folder. The configure script doesn&#8217;t seem to work, so we need to work around this. Follow these steps in terminal to install it:
cd ./tools/jam/src/
./build.sh
cp bin.macosxx86/bjam ../../../
cd [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oliverdowling.wordpress.com&blog=4317335&post=149&subd=oliverdowling&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>First, <a title="Apache Thrift" href="http://incubator.apache.org/thrift/">Thrift</a> requires <a title="Boost C++ Libraries" href="http://www.boost.org/">Boost</a>, which is not included in OS X by default. Go to the <a title="Boost C++ Libraries" href="http://www.boost.org/">Boost</a> site and download the latest version. Unzip and open Terminal for that folder. The configure script doesn&#8217;t seem to work, so we need to work around this. Follow these steps in terminal to install it:</p>
<pre style="border:1px dashed;overflow:auto;margin-right:25px;margin-bottom:1.5em;padding:1em;">cd ./tools/jam/src/
./build.sh
cp bin.macosxx86/bjam ../../../
cd ../../../
./bjam --prefix=/usr/local
./bjam install</pre>
<p>Next we need to also get <a title="pkg-config Wiki" href="http://en.wikipedia.org/wiki/Pkg-config">pkgconfig</a>, which also isn&#8217;t on OS X by default. This assumes <a title="The MacPorts Project" href="http://www.macports.org/">MacPorts</a> is already installed:</p>
<pre style="border:1px dashed;overflow:auto;margin-right:25px;margin-bottom:1.5em;padding:1em;">port install pkgconfig</pre>
<p>I&#8217;m using this for <a title="Facebook Engineering Puzzles" href="http://www.facebook.com/careers/puzzles.php">Facebook Puzzles</a>, so I downloaded the recommended archived version of <a title="Apache Thrift" href="http://incubator.apache.org/thrift/">Thrift</a> from <a title="Thrift direct download link" href="http://developers.facebook.com/thrift/download_thrift.php">here (direct link)</a> but you can get the latest version from the <a title="Apache Thrift Download page" href="http://incubator.apache.org/thrift/download/">Thrift download page</a>.</p>
<p>Unzip the archive and open a Terminal window in this folder and do the following commands:</p>
<pre style="border:1px dashed;overflow:auto;margin-right:25px;margin-bottom:1.5em;padding:1em;">cp /opt/local/share/aclocal/pkg.m4 aclocal
./bootstrap.sh
./configure
make
make install</pre>
<p>Now that thrift is installed, we can make the Thrift scripts for our chosen language. I started by using this for the <a title="Simon Says - Facebook Engineering Puzzles" href="http://www.facebook.com/careers/puzzles.php?puzzle_id=13">Simon Says Facebook Puzzle</a>, and I wanted to do it in python, so my Terminal commands looked like:</p>
<pre style="border:1px dashed;overflow:auto;margin-right:25px;margin-bottom:1.5em;padding:1em;">thrift --gen py simonsays.thrift</pre>
<p>Also note that to get my python program to run, I needed to also copy the Thrift python folder to my working directory.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oliverdowling.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oliverdowling.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oliverdowling.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oliverdowling.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oliverdowling.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oliverdowling.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oliverdowling.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oliverdowling.wordpress.com/149/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oliverdowling.wordpress.com/149/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oliverdowling.wordpress.com/149/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oliverdowling.wordpress.com&blog=4317335&post=149&subd=oliverdowling&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://oliverdowling.wordpress.com/2009/05/01/installing-thrift-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b3722b9d3f0771b0455f952a11d3973?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sol</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP Browser Detection</title>
		<link>http://oliverdowling.wordpress.com/2008/08/26/php-browser-detection/</link>
		<comments>http://oliverdowling.wordpress.com/2008/08/26/php-browser-detection/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 13:08:17 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://oliverdowling.wordpress.com/?p=90</guid>
		<description><![CDATA[I was looking at ways to make web sites look the same in all browsers, and I came across a handy CSS hacks page at Web Devout. Some of this I already knew and had used, unfortunately including those that aren&#8217;t recommended. Since I am a big fan of valid CSS and Strict XHTML, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oliverdowling.wordpress.com&blog=4317335&post=90&subd=oliverdowling&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I was looking at ways to make web sites look the same in all browsers, and I came across a handy <a title="WebDevout.net CSS Hacks" href="http://www.webdevout.net/css-hacks">CSS hacks</a> page at <a title="WebDevout.net" href="http://www.webdevout.net/">Web Devout</a>. Some of this I already knew and had used, unfortunately including those that aren&#8217;t recommended. Since I am a big fan of valid CSS and Strict XHTML, I wanted a way that I could easily apply different CSS to specific browsers. After finding no simple JavaScript options, I searched for PHP options and came across a <a title="Drupal.org" href="http://drupal.org/">Drupal</a> page that offered a <a title="Drupal Detect Browser and Display PHP Snippet" href="http://drupal.org/node/65903">&#8220;PHP Snippet&#8221;</a> that I thought I could work with. As I posted on the site, I tested what the contents of the $_SERVER['HTTP_USER_AGENT'] variable were in the browsers that I would want to look the same, <a title="Apple Safari Web Browser" href="http://www.apple.com/safari/">Safari</a>, <a title="Mozilla Firefox Web Browser" href="http://www.mozilla.com/firefox/">Firefox</a>, <a title="Internet Explorer Web Browser" href="http://www.microsoft.com/windows/products/winfamily/ie/default.mspx">Internet Explorer</a> (6 and 7) and <a title="Opera Web Browser" href="http://www.opera.com/">Opera</a>.</p>
<p><span id="more-90"></span>I then did checks on the server variable and added a different stylesheet to the page for each browser. This could easily be adapted to redirect to different pages, include other php pages, etc. This is what I came up with:</p>
<pre style="border:1px dashed;overflow:auto;margin-right:25px;padding:1em;"><span style="color:#ff0000;">&lt;?php</span>
<span style="color:#3366ff;">if</span> (strpos(<span style="color:#800000;">$_SERVER</span>[<span style="color:#008000;">'HTTP_USER_AGENT'</span>], <span style="color:#008000;">'Safari'</span>))
{
    <span style="color:#999999;">//Browser is Safari</span>
    <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;link href="Safari_only.css" rel="stylesheet" type="text/css" /&gt;'</span>;
}
<span style="color:#3366ff;">else if</span> (strpos(<span style="color:#800000;">$_SERVER</span>[<span style="color:#008000;">'HTTP_USER_AGENT'</span>], <span style="color:#008000;">'Firefox'</span>))
{
    <span style="color:#999999;">//Browser is Firefox</span>
    <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;link href="FF_only.css" rel="stylesheet" type="text/css" /&gt;'</span>;
}
<span style="color:#3366ff;">else if</span> (strpos(<span style="color:#800000;">$_SERVER</span>[<span style="color:#008000;">'HTTP_USER_AGENT'</span>], <span style="color:#008000;">'Opera'</span>) === true)
{
    <span style="color:#999999;">//Browser is Opera</span>
    <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;link href="Opera_only.css" rel="stylesheet" type="text/css" /&gt;'</span>;
}
<span style="color:#3366ff;">else</span>
{
    <span style="color:#800000;">$msie_pos</span> = strpos(<span style="color:#800000;">$_SERVER</span>[<span style="color:#008000;">'HTTP_USER_AGENT'</span>], <span style="color:#339966;">'MSIE'</span>);
    <span style="color:#3366ff;">if</span> (<span style="color:#800000;">$msie_pos</span> === true)
    {
        <span style="color:#999999;">//Browser is Internet Explorer</span>
        <span style="color:#800000;">$msie_version</span> = substr(<span style="color:#800000;">$_SERVER</span>[<span style="color:#008000;">'HTTP_USER_AGENT'</span>], (<span style="color:#800000;">$msie_pos</span> + <span style="color:#ff0000;">5</span>), <span style="color:#ff0000;">1</span>);
        <span style="color:#3366ff;">if</span> (<span style="color:#800000;">$msie_version</span> &lt; <span style="color:#008000;">'7'</span>)
        {
            <span style="color:#999999;">//Browser is Internet Explorer 6 (or below)</span>
            <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;link href="IE6_only.css" rel="stylesheet" type="text/css" /&gt;'</span>;
        }
        <span style="color:#3366ff;">else</span>
        {
            <span style="color:#999999;">//Browser is Internet Explorer 7 (or above)</span>
            <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;link href="IE7_only.css" rel="stylesheet" type="text/css" /&gt;'</span>;
        }
    }
    <span style="color:#3366ff;">else</span>
    {
        <span style="color:#999999;">//Other browser.</span>
    }
}
<span style="color:#ff0000;">?&gt;</span></pre>
<p> <br />
I have since successfully used this in a personal site of mine and a site for work. If you have any questions/suggestions or even a better way of doing this, feel free to let me know.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/oliverdowling.wordpress.com/90/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/oliverdowling.wordpress.com/90/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oliverdowling.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oliverdowling.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oliverdowling.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oliverdowling.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oliverdowling.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oliverdowling.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oliverdowling.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oliverdowling.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oliverdowling.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oliverdowling.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oliverdowling.wordpress.com&blog=4317335&post=90&subd=oliverdowling&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://oliverdowling.wordpress.com/2008/08/26/php-browser-detection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b3722b9d3f0771b0455f952a11d3973?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sol</media:title>
		</media:content>
	</item>
		<item>
		<title>IMDb search list with PHP</title>
		<link>http://oliverdowling.wordpress.com/2008/08/08/imdb-search-list-with-php/</link>
		<comments>http://oliverdowling.wordpress.com/2008/08/08/imdb-search-list-with-php/#comments</comments>
		<pubDate>Thu, 07 Aug 2008 14:56:24 +0000</pubDate>
		<dc:creator>Oliver</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://oliverdowling.wordpress.com/?p=25</guid>
		<description><![CDATA[I&#8217;m planning on making my own web site that users can enter what movies they have, along with the quality, and then mixed with a little bit of social networking, where a few friends are then able to see what their friends have, so that they can get a copy or borrow it from their [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oliverdowling.wordpress.com&blog=4317335&post=25&subd=oliverdowling&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;m planning on making my own web site that users can enter what movies they have, along with the quality, and then mixed with a little bit of social networking, where a few friends are then able to see what their friends have, so that they can get a copy or borrow it from their friends. I also wanted to be able to link it to <a title="IMDB The Internet Movie Database" href="http://www.imdb.com/">IMDb</a> so that users could easily see movies that friends have, and then click a link to go to the IMDb page (and/or to retrieve and store some of this information on my server).</p>
<p>So, the user would log in, and click to add a movie, and then they would type the name or partial name into a box, and click search, and the site would display search results from IMDb, the user would click on a result, and it would automatically store the movie in the database if it isn&#8217;t there, along with the IMDb link and and other information that we might want.</p>
<p><span id="more-25"></span></p>
<p>I thought I would start with how I was going to retrieve the IMDb search results list. My first thought was to just make a php page that did the same thing as a user going and searching themselves, filtering out the unwanted information, and returning the rest. This would unnecessarily increase my server data transfers, so I decided to look for another way. I went to IMDb to see if perhaps they had a page that provided this functionality. They have downloadable text files of all the information in their database, and various programs to then search that data, but that required having those files on your server to begin with, and I didn&#8217;t feel like downloading that list every month just to stay up to date with the latest movies.</p>
<p>I decided to have a look on <a title="Google (AU)" href="http://www.google.com.au">Google</a> to see if anyone else had come up with an alternative, but all I could find were a couple of scripts that did what my original idea was; to retrieve and filter the page. So I decided to get to work. I simply retrieved the search results from IMDb, check if it took me directly to a movie, if there were no results, or if it gave search results, then use regular expressions to get all of the &#8220;Popular Titles&#8221; results.</p>
<pre style="border:1px dashed;overflow:auto;margin-right:25px;padding:1em;"><span style="color:#ff0000;">&lt;?php</span>
    <span style="color:#999999;">//Get the IMDb page.</span>
    <span style="color:#800000;">$movie</span> = <span style="color:#800000;">$_GET</span>[<span style="color:#008000;">'title'</span>];
    <span style="color:#800000;">$imdb_site</span> = <span style="color:#008000;">'http://imdb.com/find?q='</span>;
    <span style="color:#800000;">$imdb_results</span> = file_get_contents(<span style="color:#800000;">$imdb_site</span> . urlencode(<span style="color:#800000;">$movie</span>));
    <span style="color:#999999;">//Check to see if we get search results.</span>
    <span style="color:#3366ff;">if</span> (preg_match(<span style="color:#008000;">'/&lt;title&gt;IMDb Search&lt;\/title&gt;/'</span>, <span style="color:#800000;">$imdb_results</span>))
    {
        <span style="color:#999999;">//Get the 'Popular Titles' from the page.</span>
        <span style="color:#3366ff;">if</span> (preg_match_all(<span style="color:#008000;">'/&lt;p&gt;&lt;b&gt;Popular Titles&lt;\/b&gt;.+&lt;\/p&gt;/U'</span>, <span style="color:#800000;">$imdb_results</span>, <span style="color:#800000;">$popular_titles</span>, PREG_SET_ORDER ))
        {
            <span style="color:#999999;">//Get all of the IDs, Titles and Years from the links.</span>
            <span style="color:#3366ff;">if</span> (preg_match_all(<span style="color:#008000;">'/&lt;a href="\/title\/(tt[0-9]+)\/"&gt;([^&lt;]+)&lt;\/a&gt; \(([0-9]{4})\)/U'</span>, <span style="color:#800000;">$popular_titles</span>[<span style="color:#ff0000;">0</span>][<span style="color:#ff0000;">0</span>], <span style="color:#800000;">$results</span>, PREG_SET_ORDER ))
            {
                <span style="color:#999999;">//We now have all the results, output the list as XML.</span>
                <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;\r\n'</span>;
                <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;movies&gt;\r\n'</span>;
                <span style="color:#3366ff;">foreach</span> (<span style="color:#800000;">$results</span> as <span style="color:#800000;">$result</span>)
                {
                    <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;movie&gt;\r\n'</span>;
                    <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;id&gt;'</span> . <span style="color:#800000;">$result</span>[<span style="color:#ff0000;">1</span>] . <span style="color:#008000;">'&lt;/id&gt;\r\n'</span>;
                    <span style="color:#3366ff;">echo</span> <span style="color:#008000;">'&lt;title&gt;'</span> . <span style="color:#800000;">$result</span>[<span style="color:#ff0000;">2</span>] . <span style="color:#008000;">'&lt;/title&gt;\r\n'</span>;
                    <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;year&gt;'</span></span> . <span><span style="color:#800000;">$result</span></span>[<span><span style="color:#ff0000;">3</span></span>] . <span><span style="color:#008000;">'&lt;/year&gt;\r\n'</span></span>;
                    <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;/movie&gt;\r\n'</span></span>;
                }
                <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;/movies&gt;'</span></span>;
            }
        }
        <span><span style="color:#3366ff;">else</span></span>
        {
            <span><span style="color:#999999;">//No results were found.</span></span>
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'No results found.'</span></span>;
        }
    }
    <span><span style="color:#3366ff;">else</span></span>
    {
        <span style="color:#008000;"><span><span style="color:#999999;">//Get the movie information from this page.</span></span></span>
        <span><span style="color:#3366ff;">if</span></span> (preg_match_all(<span><span style="color:#008000;">'/&lt;title&gt;(.+) \(([0-9]{4})\)&lt;\/title&gt;[^\b]+\/(tt[0-9]+)"/U'</span></span>, <span><span style="color:#800000;">$imdb_results</span></span>, <span><span style="color:#800000;">$results</span></span>, PREG_SET_ORDER))
        {
            <span><span style="color:#999999;">//We now have all the result, output the list as XML.</span></span>
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;\r\n'</span></span>;
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;movies&gt;\r\n'</span></span>;
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;movie&gt;\r\n'</span></span>;
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;id&gt;'</span></span> . <span><span style="color:#800000;">$results</span></span>[<span><span style="color:#ff0000;">0</span></span>][<span style="color:#ff0000;">3</span>] . <span><span style="color:#008000;">'&lt;/id&gt;\r\n'</span></span>;
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;title&gt;'</span></span> . <span><span style="color:#800000;">$results</span></span>[<span><span style="color:#ff0000;">0</span></span>][<span style="color:#ff0000;">1</span>] . <span><span style="color:#008000;">'&lt;/title&gt;\r\n'</span></span>;
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;year&gt;'</span></span> . <span><span style="color:#800000;">$results</span></span>[<span><span style="color:#ff0000;">0</span></span>][<span style="color:#ff0000;">2</span>] . <span><span style="color:#008000;">'&lt;/year&gt;\r\n'</span></span>;
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;/movie&gt;\r\n'</span></span>;
            <span><span style="color:#3366ff;">echo</span></span> <span><span style="color:#008000;">'&lt;/movies&gt;\r\n'</span></span>;
        }
    }
<span><span style="color:#ff0000;">?&gt;</span></span></pre>
<p> <br />
Now when you view this page with page.php?title=movie it will either return an XML file with IMDb&#8217;s Popular Title/s results, or just the text &#8220;No results found.&#8221; Use AJAX to call this page and do with the information what you will. I will post again when I get around to making the next page.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/oliverdowling.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/oliverdowling.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oliverdowling.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oliverdowling.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oliverdowling.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oliverdowling.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oliverdowling.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oliverdowling.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oliverdowling.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oliverdowling.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oliverdowling.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oliverdowling.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oliverdowling.wordpress.com&blog=4317335&post=25&subd=oliverdowling&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://oliverdowling.wordpress.com/2008/08/08/imdb-search-list-with-php/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4b3722b9d3f0771b0455f952a11d3973?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">sol</media:title>
		</media:content>
	</item>
	</channel>
</rss>