<?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>NiGhTHawK &#187; PHP</title>
	<atom:link href="http://nighthawk.co.za/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://nighthawk.co.za</link>
	<description>A guy, a blog and the internet</description>
	<lastBuildDate>Fri, 30 Jul 2010 10:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>Merry Christmas to all</title>
		<link>http://nighthawk.co.za/2009/12/merry-christmas-to-all/</link>
		<comments>http://nighthawk.co.za/2009/12/merry-christmas-to-all/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 10:11:19 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[Family]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://nighthawk.co.za/?p=407</guid>
		<description><![CDATA[Well it;s that time of year again (what happend to the rest of the year). Merry Christmas to all of you out there, some of you are close and some of you are far. So special greetings go to my Dad (even though you are far away we are thinking about you and miss you]]></description>
			<content:encoded><![CDATA[<p>Well it;s that time of year again (what happend to the rest of the year).</p>
<p>Merry Christmas to all of you out there, some of you are close and some of you are far.</p>
<p>So special greetings go to my Dad (even though you are far away we are thinking about you and miss you lots)</p>
<p>Well guess I should stop being &#8220;rude&#8221; and leave the pc alone for a little bit, hope you all have an awesome day surrounded by people you love and great food.</p>
<p>And so I write some code today <img src='http://nighthawk.co.za/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<pre>&lt;?php
   $holiday = new Holiday('Christmas');
   $holiday-&gt;celebrate();
   $holiday-&gt;eatLotsOfFood();
   $holiday-&gt;beMerry();
</pre>
<p>lolz <img src='http://nighthawk.co.za/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2009/12/merry-christmas-to-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL group_concat not returning all data.</title>
		<link>http://nighthawk.co.za/2009/05/mysql-group_concat-not-returning-all-data/</link>
		<comments>http://nighthawk.co.za/2009/05/mysql-group_concat-not-returning-all-data/#comments</comments>
		<pubDate>Sat, 30 May 2009 21:15:08 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://nighthawk.co.za/?p=310</guid>
		<description><![CDATA[So working on a project for work, and it was not behaving as expected. I was selecting all the ID&#8217;s from a table that was linked to a couple of other tables, it turns out that it wasn&#8217;t returning all the id&#8217;s as expected as there is a limit on the amount of data that]]></description>
			<content:encoded><![CDATA[<p>So working on a project for work, and it was not behaving as expected.  I was selecting all the ID&#8217;s from a table that was linked to a couple of other tables,  it turns out that it wasn&#8217;t returning all the id&#8217;s as expected as there is a limit on the amount of data that GROUP_CONCAT will return. <a href="http://dev.mysql.com/doc/refman/5.1/en/group-by-functions.html#function_group-concat">MySQL Manual &#8211; GROUP_CONCAT</a></p>
<p>Well instead of using GROUP_CONCAT I&#8217;m now selecting the id&#8217;s individually, and this is now working.</p>
<p>Also there seems to be a limit on the number of items you can have in a IN clause: SELECT * FROM table WHERE field IN (xxx,xxx,xxx) so I&#8217;ve had to split these into 1000 peice chunks.</p>
<p>All seems to be working now after that, we&#8217;ll see how it goes&#8230; <img src='http://nighthawk.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2009/05/mysql-group_concat-not-returning-all-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Git colors</title>
		<link>http://nighthawk.co.za/2009/01/git-colors/</link>
		<comments>http://nighthawk.co.za/2009/01/git-colors/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 09:21:59 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://nighthawk.co.za/?p=262</guid>
		<description><![CDATA[I&#8217;ve been using Git for a while now and am enjoying it over SVN. Especially the fact that it&#8217;s distributed. Well recently I was having an issue with the color output: &#60;config ~/.gitconfig&#62; [color] ui = auto &#60;/config&#62; After enabling colors I was getting the following: # ESC[31mmodified: cms/config.phpESC[m And then I found an entry]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Git for a while now and am enjoying it over SVN. Especially the fact that it&#8217;s distributed.</p>
<p>Well recently I was having an issue with the color output:</p>
<pre>&lt;config ~/.gitconfig&gt;
[color]
ui = auto
&lt;/config&gt;</pre>
<p>After enabling colors I was getting the following:</p>
<pre>#       ESC[31mmodified:   cms/config.phpESC[m</pre>
<p>And then I found an <a href="http://git.or.cz/gitwiki/GitFaq#head-678310c22f3e4a233d348bdde55a3e4cb7368ee9" target="_blank">entry on the GitFaq</a> which fixed the issue <img src='http://nighthawk.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>&lt;config ~/.gitconfig&gt;
[core]
pager = less -FXRS
&lt;/config&gt;</pre>
<p>Hope this helps someone else having the same issue.</p>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2009/01/git-colors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Jabber on Debian Etch</title>
		<link>http://nighthawk.co.za/2008/09/installing-jabber-on-debian-etch/</link>
		<comments>http://nighthawk.co.za/2008/09/installing-jabber-on-debian-etch/#comments</comments>
		<pubDate>Fri, 26 Sep 2008 12:54:26 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://nighthawk.co.za/?p=224</guid>
		<description><![CDATA[Well I just finished getting Jabber installed and working on my local network. Thanks go here and here. Basically I just followed the first link to get the server up, and the second to get a web client running. I did have a couple of issues with the web client, but I will try to]]></description>
			<content:encoded><![CDATA[<p>Well I just finished getting Jabber installed and working on my local network.</p>
<p>Thanks go <a href="http://sysmonblog.co.uk/?p=11">here</a> and <a href="http://florianhaas.net/blog/2008/05/27/tutorialhowto-ejabberd-jwchat-apache2-on-ubuntu-or-debian/">here</a>.</p>
<p>Basically I just followed the first link to get the server up, and the second to get a web client running.</p>
<p>I did have a couple of issues with the web client, but I will try to document them at another date&#8230; (well I need to reinstall the server soon)</p>
<p>Now just to get jabber to talk to the outside world <img src='http://nighthawk.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2008/09/installing-jabber-on-debian-etch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress</title>
		<link>http://nighthawk.co.za/2008/08/wordpress/</link>
		<comments>http://nighthawk.co.za/2008/08/wordpress/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 16:04:03 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://nighthawk.co.za/?p=159</guid>
		<description><![CDATA[Ok, yet again I’ve changed the software behind this site. Well I’m not finding the time to update the code for this site, and also why reinvent the wheel. Well lets see how this goes, hopefully we stick with it for a while PS. This also means that comments are once again enabled, and soon]]></description>
			<content:encoded><![CDATA[<p>Ok, yet again I’ve changed the software behind this site.</p>
<p>Well I’m not finding the time to update the code for this site, and also why reinvent the wheel.</p>
<p>Well lets see how this goes, hopefully we stick with it for a while <img class="wp-smiley" src="http://localdev/wordpress/wp-includes/images/smilies/icon_wink.gif" alt=";)" /></p>
<p>PS. This also means that comments are once again enabled, and soon to come Flickr <img class="wp-smiley" src="http://localdev/wordpress/wp-includes/images/smilies/icon_smile.gif" alt=":)" /></p>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2008/08/wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>STFU @ comment spambots</title>
		<link>http://nighthawk.co.za/2008/04/stfu-comment-spambots/</link>
		<comments>http://nighthawk.co.za/2008/04/stfu-comment-spambots/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 18:55:47 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://37</guid>
		<description><![CDATA[Well I&#8217;ve disabled comments for now&#8230; well until I can add an anti spam feature If people used all the energy that they use to fill the internet with spam, for good the world would be a better place!!!]]></description>
			<content:encoded><![CDATA[<p>Well I&#8217;ve disabled comments for now&#8230; well until I can add an anti spam feature</p>
<p>If people used all the energy that they use to fill the internet with spam, for good the world would be a better place!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2008/04/stfu-comment-spambots/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symfony and git</title>
		<link>http://nighthawk.co.za/2008/01/symfony-and-git/</link>
		<comments>http://nighthawk.co.za/2008/01/symfony-and-git/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 18:28:10 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://23</guid>
		<description><![CDATA[Well decided to tryout a php based framework, and decided on symfony, it seem pretty good, nice and easy to use. It took me _alot_ less time to recreate this site using symfony. Going to recreate reddevil.co.za using symfony aswell, hopefully this will be quick, and will make maintainance a lot easier I also decided]]></description>
			<content:encoded><![CDATA[<p>Well decided to tryout a php based framework, and decided on <a href="http://www.symfony-project.org/" target="_blank">symfony</a>, it seem pretty good, nice and easy to use. It took me _alot_ less time to recreate this site using symfony.</p>
<p>Going to recreate reddevil.co.za using symfony aswell, hopefully this will be quick, and will make maintainance a lot easier</p>
<p>I also decided to try <a href="http://git.or.cz/" target="_blank">GIT</a>. It also looks good so far, finally managed to setup a central git repository, I know this is kinda against the point of git. But I like the idea of having a local repository that I can commit changes to and then once happy with all the commits I can send them to the central repo</p>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2008/01/symfony-and-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Site Updates &#8211; Gravatar</title>
		<link>http://nighthawk.co.za/2007/12/site-updates-gravatar/</link>
		<comments>http://nighthawk.co.za/2007/12/site-updates-gravatar/#comments</comments>
		<pubDate>Sun, 02 Dec 2007 21:12:00 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://16</guid>
		<description><![CDATA[Well added support for gravatars this morning, man these things are pretty kewl. If you have are registered on http://site.gravatar.com/ and you use your email address when leaving a comment, then your gravitar is shown next to your name&#8230; This was suprisingly simple to setup&#8230; I used MySQL to supply me the MD5 but the]]></description>
			<content:encoded><![CDATA[<p>Well added support for gravatars this morning, man these things are pretty kewl.</p>
<p>If you have are registered on  <a href="http://site.gravatar.com" target="_blank">http://site.gravatar.com/</a> and you use your email address when leaving a comment, then your gravitar is shown next to your name&#8230; <img src='http://nighthawk.co.za/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>This was suprisingly simple to setup&#8230; <img src='http://nighthawk.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I used MySQL to supply me the MD5 but the solution on there site is:</p>
<h2>PHP</h2>
<p>Implementing gravatars with PHP is quite simple. PHP provides both md5() and urlencode() functions, allowing us to create the gravatar URL with ease. Assume the following data:</p>
<pre>    $email = "someone@somewhere.com";
    $default = "http://www.somewhere.com/homestar.jpg";
    $size = 40;</pre>
<p>You can construct your gravatar url with the following php code:</p>
<pre>    $grav_url = "http://www.gravatar.com/avatar.php?".
                "gravatar_id=".md5($email).
                "&amp;default=".urlencode($default).
                "&amp;size=".$size;</pre>
<p>Once the gravatar URL is created, you can output it whenever you please:</p>
<pre>    print("&lt;img src=\"{$grav_url}\" alt=\"\" /&gt;");</pre>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2007/12/site-updates-gravatar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New website design (front and back)</title>
		<link>http://nighthawk.co.za/2007/09/new-website-design-front-and-back/</link>
		<comments>http://nighthawk.co.za/2007/09/new-website-design-front-and-back/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 07:13:00 +0000</pubDate>
		<dc:creator>Clifford W. Hansen</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://2</guid>
		<description><![CDATA[So finally here it is, I have finally finished the redesign of my site. I have decided on a MVC type framework, which means everything is vary modular, and it&#8217;s alot quicker to create new modules Well best I finish the last couple of tweaks]]></description>
			<content:encoded><![CDATA[<p>So finally here it is, I have finally finished the redesign of my site.</p>
<p>I have decided on a MVC type framework, which means everything is vary modular, and it&#8217;s alot quicker to create new modules</p>
<p>Well best I finish the last couple of tweaks</p>
]]></content:encoded>
			<wfw:commentRss>http://nighthawk.co.za/2007/09/new-website-design-front-and-back/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
