<?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>My Heard Space &#187; PHP</title>
	<atom:link href="http://heardspace.sulehosting.co.za/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://heardspace.sulehosting.co.za</link>
	<description>when nothing makes sense[shutdown -h now]</description>
	<lastBuildDate>Wed, 07 Oct 2009 21:32:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Php Excel reader</title>
		<link>http://heardspace.sulehosting.co.za/2009/03/php-excel-reader/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://heardspace.sulehosting.co.za/2009/03/php-excel-reader/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 11:19:19 +0000</pubDate>
		<dc:creator>Root</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP Library]]></category>

		<guid isPermaLink="false">http://heardspace.sulehosting.co.za/2009/03/php-excel-reader/</guid>
		<description><![CDATA[The PHP library expands on the great work done in the PHP Excel Reader project on SourceForge. It reads the binary format of XLS files directly and can return values and formats from any cell. I have only played around with it for an hour , but for anyone who is working with php and [...]]]></description>
			<content:encoded><![CDATA[<p>The PHP library expands on the great work done in the PHP Excel Reader project on SourceForge. It reads the binary format of XLS files directly and can return values and formats from any cell. I have only played around with it for an hour , but for anyone who is working with php and excel you will find it very useful. Well what are you waiting for <a href="http://code.google.com/p/php-excel-reader/">Get started now</a>.</p>
<p class="zemanta-pixie"><img src="http://img.zemanta.com/pixy.gif?x-id=d4432088-19bc-4158-b293-241f9603a558" class="zemanta-pixie-img" /></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F&amp;title=Php+Excel+reader" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F&amp;title=Php+Excel+reader" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F&amp;title=Php+Excel+reader" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F&amp;title=Php+Excel+reader" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F&amp;title=Php+Excel+reader', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F&amp;title=Php+Excel+reader" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F03%2Fphp-excel-reader%2F&amp;title=Php+Excel+reader" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>none]]></content:encoded>
			<wfw:commentRss>http://heardspace.sulehosting.co.za/2009/03/php-excel-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPIDS (PHP-Intrusion Detection System)</title>
		<link>http://heardspace.sulehosting.co.za/2009/02/phpids-php-intrusion-detection-system/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://heardspace.sulehosting.co.za/2009/02/phpids-php-intrusion-detection-system/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 12:58:13 +0000</pubDate>
		<dc:creator>Root</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://heardspace.sulehosting.co.za/2009/02/phpids-php-intrusion-detection-system/</guid>
		<description><![CDATA[I came across this about a month ago, It&#8217;s a php library that helps you do sanity checks on user input variables
e.g $_POST , $_GET and $_REQUEST .
The library works on defined intrusion patterns which detect a malicious users&#8217; attempts to break your php code and it also allows you to add define your own [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this about a month ago, It&#8217;s a php library that helps you do sanity checks on user input variables</p>
<p>e.g $_POST , $_GET and $_REQUEST .</p>
<p>The library works on defined intrusion patterns which detect a malicious users&#8217; attempts to break your php code and it also allows you to add define your own patterns. This helps to prevent a lot of issues like sql injections, url tempering and others. I have been playing around with it for weeks now and I am impressed with it&#8217;s functionality, it&#8217;s deninately going to be added into my code base. I would advice that you check it out and see what it can do for you.</p>
<p>Details:<br />
Site     &#8211; <a href="http://www.phpids.org/">PHPIDS</a><br />
Demo     &#8211; <a href="http://php-ids.org/demo/">PHPIDS DEMO</a><br />
Download &#8211; <a href="http://php-ids.org/downloads/">Here</a></p>
<p>Please remember to read the license before you start using it.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F&amp;title=PHPIDS+%28PHP-Intrusion+Detection+System%29" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F&amp;title=PHPIDS+%28PHP-Intrusion+Detection+System%29" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F&amp;title=PHPIDS+%28PHP-Intrusion+Detection+System%29" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F&amp;title=PHPIDS+%28PHP-Intrusion+Detection+System%29" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F&amp;title=PHPIDS+%28PHP-Intrusion+Detection+System%29', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F&amp;title=PHPIDS+%28PHP-Intrusion+Detection+System%29" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphpids-php-intrusion-detection-system%2F&amp;title=PHPIDS+%28PHP-Intrusion+Detection+System%29" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>none]]></content:encoded>
			<wfw:commentRss>http://heardspace.sulehosting.co.za/2009/02/phpids-php-intrusion-detection-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Php DNS Daemon</title>
		<link>http://heardspace.sulehosting.co.za/2009/02/php-dns-daemon/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://heardspace.sulehosting.co.za/2009/02/php-dns-daemon/#comments</comments>
		<pubDate>Fri, 20 Feb 2009 10:36:31 +0000</pubDate>
		<dc:creator>Root</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://heardspace.sulehosting.co.za/2009/02/php-dns-daemon/</guid>
		<description><![CDATA[I know what you thinking, I had the same thing happen to when I read the title on the original blog. Apparently the concept does work and It seems to get the job done. you can read more on this subject at PhP DNS Daemon . This makes you wonder how far you can push [...]]]></description>
			<content:encoded><![CDATA[<p class="zemanta-pixie">I know what you thinking, I had the same thing happen to when I read the title on the original blog. Apparently the concept does work and It seems to get the job done. you can read more on this subject at <a href="http://blog.magicaltux.net/2009/02/16/php-dns-daemon/">PhP DNS Daemon</a> . This makes you wonder how far you can push php, I guess sometimes all you need is imagination and the will to see it through.</p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F&amp;title=Php+DNS+Daemon" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F&amp;title=Php+DNS+Daemon" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F&amp;title=Php+DNS+Daemon" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F&amp;title=Php+DNS+Daemon" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F&amp;title=Php+DNS+Daemon', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F&amp;title=Php+DNS+Daemon" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2009%2F02%2Fphp-dns-daemon%2F&amp;title=Php+DNS+Daemon" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span>none]]></content:encoded>
			<wfw:commentRss>http://heardspace.sulehosting.co.za/2009/02/php-dns-daemon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting mobile devices on your website</title>
		<link>http://heardspace.sulehosting.co.za/2008/02/detecting-mobile-devices-on-your-website/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed</link>
		<comments>http://heardspace.sulehosting.co.za/2008/02/detecting-mobile-devices-on-your-website/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 22:15:35 +0000</pubDate>
		<dc:creator>Root</dc:creator>
				<category><![CDATA[PHP]]></category>
<category>mobile</category><category>ringtones</category><category>wml</category><category>wurfl</category>
		<guid isPermaLink="false">http://heardspace.sulehosting.co.za/?p=7</guid>
		<description><![CDATA[The purpose of this post is to introduce the concept of detecting mobile devices on your website using an open source library called wurfl, The library can be deployed using the following programming languages:

1C++
Dot Net
Java
Perl
Python
PHP
Ruby

I will be using PHP for all the examples on this post, So I hope you have a little understanding of [...]]]></description>
			<content:encoded><![CDATA[<p>The purpose of this post is to introduce the concept of detecting mobile devices on your website using an open source library called <a href="http://http//wurfl.sourceforge.net/" target="_blank">wurfl</a>, The library can be deployed using the following programming languages:</p>
<ol>
<li>1C++</li>
<li>Dot Net</li>
<li>Java</li>
<li>Perl</li>
<li>Python</li>
<li>PHP</li>
<li>Ruby</li>
</ol>
<p>I will be using PHP for all the examples on this post, So I hope you have a little understanding of PHP to go through some of the example code.</p>
<p><strong>Requirements for this Exercise:</strong></p>
<ul>
<li>Web server(any will do)</li>
<li>PHP</li>
<li>Wurfl(download <a href="http://wurfl.sourceforge.net/php/index.php"><u>http://wurfl.sourceforge.net/php/index.php</u></a>)</li>
<li><a href="http://wurfl.sourceforge.net/wurfl.xml">wurfl.xml<span style="text-decoration: none"> 	(download xml file)</span></a></li>
<li>Access to htdocs(web server home directory with write permission)</li>
</ul>
<ul>
<li>At least 50 mega bytes of storage(for the wurfl files to be 	generated).</li>
</ul>
<p><strong>Step 1:</strong>This step can be set up in different ways, It all depends  on how you want to use <a href="http://http//wurfl.sourceforge.net/" target="_blank">wurfl</a> on your project, I personally use it on more than one project. To avoid creating a <a href="http://http//wurfl.sourceforge.net/" target="_blank">wurfl</a> installation for all my projects I have had to  set up a global <a href="http://http//wurfl.sourceforge.net/" target="_blank">wurfl</a> installation on my web server which allows all my projects to use one <a href="http://http//wurfl.sourceforge.net/" target="_blank">wurfl</a> instance.</p>
<p><strong>create wurfl global</strong></p>
<p><span>go to </span><strong><font color="#ff0000"><em>/www</em></font><font color="#ff0000"> </font></strong><span> and create a folder called </span><strong><font color="#e00000"><em><span style="text-decoration: none">/www/global</span></em></font></strong><em><span> </span></em><span style="font-style: normal"></span><span>and inside global create another directory called</span><em><span> </span></em><strong><font color="#e00000"><em><span style="text-decoration: none">/www/global/wurfl</span></em></font></strong><font color="#000000"><span style="font-style: normal"></span><span>. We need to create one last directory inside our </span></font><strong><font color="#e00000"><em><span style="text-decoration: none">/www/global/wurfl/</span></em></font></strong><font color="#000000"><span style="font-style: normal"></span><span> directory which we are going to call </span></font><strong><font color="#e00000"><em><span style="text-decoration: none">/www/global/wurfl/data</span></em></font></strong><font color="#000000"><span style="font-style: normal"></span><span>, Before we close this step please make sure that your directory </span></font><strong><font color="#e00000"><em><span style="text-decoration: none">/www/global/wurfl/data</span></em></font></strong><font color="#000000"><span style="font-style: normal"></span><span> is writeable</span></font></p>
<p><font color="#000000"><span style="font-style: normal"></span><span>chmod 0777 </span></font><strong><font color="#e00000"><em><span style="text-decoration: none">/www/global/wurfl/data</span></em></font></strong><font color="#ff0000"><span style="font-style: normal"></span><span> </span></font></p>
<p style="font-style: normal"><font style="font-size: 15pt" size="4"><strong>NB</strong></font> chmod 0777 is not recommended on a production server and one must be careful when granting write permission to files. For the sake of the demonstration we will ignore this rule though.</p>
<p>Your directory structure should look like this: <font color="#000000"><span style="text-decoration: none"><font color="#e00000"><em><strong>/www/global/wurfl/data</strong></em></font></span></font></p>
<p><strong>Step 2:</strong><br />
Go to wurfl download page and get the PHP files and store them inside <font color="#e00000"><em><span style="text-decoration: none"><strong>/www/global/wurfl</strong></span></em></font> directory <a href="http://wurfl.sourceforge.net/php/index.php"><u>http://wurfl.sourceforge.net/php/index.php</u></a><br />
<font color="#000000"><span style="font-style: normal"></span><span style="text-decoration: none"></span><span>you need to also download the <a href="http://wurfl.sourceforge.net/wurfl.xml%287">http://wurfl.sourceforge.net/wurfl.xml(7</a><a href="http://wurfl.sourceforge.net/wurfl.xml">mb)</a><a href="http://wurfl.sourceforge.net/wurfl.xml">  </a>which contains all the information about the different types of phones in the market. This file is updated constantly and you need to update it on your side regularly. This file must be copied to </span></font><font color="#e00000"><em><span style="text-decoration: none"><strong>/www/global/wurfl/data/wurfl.xml</strong></span></em></font></p>
<p style="text-decoration: none"><strong>Step 3:</strong><br />
<span>After you uncompress the downloaded PHP files you should have these following files available:1. </span></p>
<ol>
<li><span>check_wurfl.php</span></li>
<li><span>update_cache.php</span></li>
<li><span></span><span> wurfl_class.php</span></li>
<li>wurfl_config.php</li>
<li>wurfl_parser.php</li>
<li>readme.txt</li>
</ol>
<p style="text-decoration: none"><strong>Step 4:</strong></p>
<p><span style="text-decoration: none"></span><span>Now lets configure our library by opening </span><font color="#e00000"><em><span style="text-decoration: none"><strong>/www/global/wurfl/wurfl_config.php</strong></span></em></font><br />
<span style="text-decoration: none"></span><span>lets change the config file as shown below.</span></p>
<p><span style="text-decoration: none"></span><span>Line 90:</span><br />
<font color="#e00000"><strong><span style="text-decoration: none">NB: Make path absolute</span></strong></font></p>
<p><em><span style="text-decoration: none"></span><span>// Where all data is stored (wurfl.xml, cache file, logs, etc)                                              define(&#8221;DATADIR&#8221;, &#8216;/www/global/wurfl/data/&#8217;); </span></em></p>
<p><span style="font-style: normal"></span><span style="text-decoration: none"></span><span>Line 93:</span><em><span style="text-decoration: none"></span><span><br />
// Path and filename of wurfl_parser.php                                              define(&#8221;WURFL_PARSER_FILE&#8221;, &#8216;/www/global/wurfl/wurfl_parser.php&#8217;); </span></em></p>
<p><span style="font-style: normal"></span><span style="text-decoration: none"></span><span>Line 96:</span><em><span style="text-decoration: none"></span><span><br />
// Path and filename of wurfl_class.php                                                  define(&#8221;WURFL_CLASS_FILE&#8221;, &#8216;/www/global/wurfl/wurfl_class.php&#8217;); </span></em></p>
<p><span style="text-decoration: none"></span><span>That will do for now. If you are interested in some of the  configuration settings on this file you can consult the documentation for the library.</span></p>
<p style="font-style: normal; text-decoration: none"><strong>Step 5:</strong><br />
<a title="DDE_LINK" name="DDE_LINK"></a> We now need to run <font color="#e00000"><em><strong>/www/global/wurfl/update_cache.php </strong></em></font><font color="#000000">on the console which will create a folder called </font><font color="#e00000"><em><strong>/global/wurfl/data/multicache</strong></em></font><font color="#000000"> that has a lot of files inside of it. </font>
</p>
<p style="font-style: normal; text-decoration: none">  <font color="#e00000"><em><strong>/usr/bin/php  -f /www/global/wurfl/update_cache.php</strong></em></font></p>
<p style="font-style: normal"> <font color="#000000">After you run the command it will create the folder mentioned above and a file called </font><font color="#e00000"><em><strong>/www/global/wurfl/data/cache.php</strong></em></font>. This command will take a while to execute depending on your machine but will take between 30 to 60 seconds to execute. <span style="text-decoration: none"></span><span>My </span><font color="#e00000"><em><span style="text-decoration: none"><strong>/www/global/wurfl/data</strong></span></em></font><span style="text-decoration: none"></span><span> directory&#8217;s size is now </span><font color="#e00000"><span style="text-decoration: none"><strong>37</strong></span></font><span style="text-decoration: none"><strong> </strong></span><span style="text-decoration: none"></span><span>mega bytes.</span></p>
<p><strong><span style="text-decoration: none">Step 6:</span></strong><br />
<span style="text-decoration: none">Lets write a little test code which determines if the device on our site is a mobile device and if so we can then redirect the device to the mobile version of our site.</span><br />
<em><span style="text-decoration: none"></span><span><code></code></span></em></p>
<p><em><img src="http://sulehosting.co.za/wordpress/wp-content/uploads/2008/02/code_11.png" /><br />
</em></p>
<p style="font-style: normal"><span style="text-decoration: none"></span><span>Just like that we now have a script that can tell us whether the user is using a computer web browser or phone browser. If the phone is picked up by our script </span><font color="#e00000"><em><span style="text-decoration: none"><strong>$myDevice-&gt;brand = nokia</strong></span></em></font><em><span style="text-decoration: none"></span><span> </span></em><span style="text-decoration: none"></span><span>will carry the phone brand while</span><em><span style="text-decoration: none"></span><span> </span></em><font color="#e00000"><em><span style="text-decoration: none"><strong>$myDevice-&gt;model = N70</strong></span></em></font><font color="#000000"><span style="text-decoration: none"></span><span>. But Please remember that this method is not 100% accurate and also keeping an updated version of </span></font><font color="#e00000"><em><span style="text-decoration: none"><strong>/www/global/wurfl/data/wurfl.xml</strong></span></em></font><span style="text-decoration: none"></span><span> will increase the accuracy rate.</span></p>
<p style="font-style: normal"><font color="#e00000"><em><span style="text-decoration: none"><strong>$wurfl_class-&gt;capabilities</strong></span></em></font><span style="text-decoration: none"></span><span> holds an array of the device&#8217;s capabilities                                                     </span><em><span>e.g.</span></em><br />
<span style="text-decoration: none"></span><span>can the device support gif images?</span></p>
<p><em><span style="text-decoration: none"></span><span><code></code></span></em></p>
<p><em><span></span></em>
</p>
<p style="font-style: normal"><img src="http://sulehosting.co.za/wordpress/wp-content/uploads/2008/02/code_21.png" /></p>
<p style="font-style: normal"><span>Please try and explore the documentation for the library and you will find all sorts of features. For the sake of keeping this post small I will not show any more  examples but rather encourage you to read up a bit on this beautiful library. I hope you find this post useful and you get to do magical stuff with this library , Feel free to leave a comment. </span></p>
<p><span style="text-decoration: none"></span><span></span></p>

<span class="slashdigglicious">
<a href="http://slashdot.org/bookmark.pl?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F&amp;title=Detecting+mobile+devices+on+your+website" title="Slashdot It!"><img src="http://slashdot.org/favicon.ico" height="16" width="16" alt="[Slashdot]" /></a>
<a href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F&amp;title=Detecting+mobile+devices+on+your+website" title="Digg This Story"><img src="http://digg.com/favicon.ico" width="16" height="16" alt="[Digg]" /></a>
<a href="http://reddit.com/submit?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F&amp;title=Detecting+mobile+devices+on+your+website" title="Reddit"><img src="http://reddit.com/favicon.ico" width="16" height="16" alt="[Reddit]" /></a>
<a href="http://del.icio.us/post?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F&amp;title=Detecting+mobile+devices+on+your+website" title="Save to del.icio.us" onclick="window.open('http://del.icio.us/post?v=4&amp;noui&amp;jump=close&amp;url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F&amp;title=Detecting+mobile+devices+on+your+website', 'delicious', 'toolbar=no,width=700,height=400'); return false;"><img src="http://del.icio.us/favicon.ico" width="16" height="16" alt="[del.icio.us]" /></a>
<a href="http://www.facebook.com/share.php?u=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F" title="Share on Facebook"><img src="http://www.facebook.com/favicon.ico" width="16" height="16" alt="[Facebook]" /></a>
<a href="http://technorati.com/faves?add=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F" title="Add to my Technorati Favorites"><img src="http://technorati.com/favicon.ico" width="16" height="16" alt="[Technorati]" /></a>
<a href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F&amp;title=Detecting+mobile+devices+on+your+website" title="Save to Google Bookmarks"><img src="http://www.google.com/favicon.ico" width="16" height="16" alt="[Google]" /></a>
<a href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fheardspace.sulehosting.co.za%2F2008%2F02%2Fdetecting-mobile-devices-on-your-website%2F&amp;title=Detecting+mobile+devices+on+your+website" title="Stumble it!"><img src="http://www.stumbleupon.com/favicon.ico" width="16" height="16" alt="[StumbleUpon]" /></a>
</span><br /><strong>Tags:</strong> <a href="http://heardspace.sulehosting.co.za/tag/mobile" title="Browse for mobile" rel="tag">mobile</a>, <a href="http://heardspace.sulehosting.co.za/tag/ringtones" title="Browse for ringtones" rel="tag">ringtones</a>, <a href="http://heardspace.sulehosting.co.za/tag/wml" title="Browse for wml" rel="tag">wml</a>, <a href="http://heardspace.sulehosting.co.za/tag/wurfl" title="Browse for wurfl" rel="tag">wurfl</a>]]></content:encoded>
			<wfw:commentRss>http://heardspace.sulehosting.co.za/2008/02/detecting-mobile-devices-on-your-website/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
