<?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>Jordan Hall &#187; PHP</title>
	<atom:link href="http://jordanhall.co.uk/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://jordanhall.co.uk</link>
	<description>Jordan Hall - programmer and geek</description>
	<lastBuildDate>Thu, 19 Jan 2012 11:36:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Bitcoin Helper 0.11 &#8211; Error handling and caching</title>
		<link>http://jordanhall.co.uk/social-media-search-engine-optimisation-seo/bitcoin-helper-0-11-error-handling-and-exchange-rate-caching-13011366/</link>
		<comments>http://jordanhall.co.uk/social-media-search-engine-optimisation-seo/bitcoin-helper-0-11-error-handling-and-exchange-rate-caching-13011366/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 09:49:13 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Social Media & Search Engine Optimisation (SEO)]]></category>
		<category><![CDATA[Bitcoin]]></category>
		<category><![CDATA[crypto-currency]]></category>
		<category><![CDATA[currency]]></category>
		<category><![CDATA[finance]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=1366</guid>
		<description><![CDATA[This is a quick post to announce the release of Bitcoin Helper 0.11. Bitcoin Helper 0.11 contains significantly better error handler than the initial release (0.1) and also makes the file-based caching of the JSON retrieved from bitcoincharts.com mandatory. Error Handling It can now handle internal issues with network communication to the data source and incorrect [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jordanhall.co.uk/wp-content/uploads/2012/01/error_warning_icon.png"><img class="alignright  wp-image-1371" title="Warning icon" src="http://jordanhall.co.uk/wp-content/uploads/2012/01/error_warning_icon.png" alt="Warning icon" width="63" height="63" /></a>This is a quick post to announce the release of Bitcoin Helper 0.11. Bitcoin Helper 0.11 contains significantly better error handler than the initial release (0.1) and also makes the file-based caching of the JSON retrieved from bitcoincharts.com mandatory.</p>
<h2>Error Handling</h2>
<p>It can now handle internal issues with network communication to the data source and incorrect JSON formatting of retrieved data. Bitcoin Helper 0.11 also checks to ensure the requested ISO 4217 currency code, for conversion to Bitcoin, is supported.</p>
<p>Certain functions in Bitcoin Helper now return a negative integer in the case that an error occurs. Details regarding these error codes can be found in the source code comments of bitcoin_helper.php. The relevant section of commenting is quoted below for convenience.</p>
<blockquote><p>/* Information about error codes</p>
<p>Certain functions within Bitcoin Helper (0.11 onwards) will return<br />
numeric error codes in the case of unexpected error or failure.</p>
<p>You should make sure to check the returned value for error codes<br />
(inte<del>r</del>gers less than zero) in your code. The following reference<br />
shows the error numbers and an explanation.</p>
<p>* -1 = Network error retrieving data from bitcoincharts.com<br />
* -2 = Error decoding JSON data retrieved from bitcoincharts.com<br />
* -3 = Currency code not supported<br />
* -4 = Could not write to cache file &#8211; check permissions!<br />
*/</p></blockquote>
<h2>File-based Caching</h2>
<p>Bitcoin Helper 0.1 would cache the JSON containing currency exchange rates to a file if possible. This caching is now a requirement as of Bitcoin Helper 0.11.</p>
<p>Bitcoin Helper will attempt to write a file named &#8216;bitcoin_weighted_prices.json&#8217;. If this file is not writeable, you will receive error code -4.</p>
<p>If you receive this error, you will need to alter the permissions of the directory to allow this file to be created. Once created, you can revert the directory permissions if you desire and make only the individual &#8216;bitcoin_weighted_prices.json&#8217; file writeable.</p>
<h2>Download Bitcoin Helper 0.11</h2>
<p>To download Bitcoin Helper 0.11 with improved error handling, please go to the <a title="Bitcoin Helper – PHP Bitcoin class" href="http://jordanhall.co.uk/projects/bitcoin-helper-php-bitcoin-class/">Bitcoin Helper</a> project page.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/social-media-search-engine-optimisation-seo/bitcoin-helper-0-11-error-handling-and-exchange-rate-caching-13011366/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storing PHP Session data in a database</title>
		<link>http://jordanhall.co.uk/programming/storing-php-session-data-in-a-database-20061251/</link>
		<comments>http://jordanhall.co.uk/programming/storing-php-session-data-in-a-database-20061251/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 12:32:20 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[database PHP sessions]]></category>
		<category><![CDATA[database storage]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[MySQL server]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP session]]></category>
		<category><![CDATA[PHP session storage]]></category>
		<category><![CDATA[PHP sessions]]></category>
		<category><![CDATA[PHP sessions in MySQL database]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=1251</guid>
		<description><![CDATA[I&#8217;ve recently exchanged e-mails with a colleague regarding the storage of PHP sessions data in a MySQL database. To help anyone else interested in using database storage of PHP session information, I have paraphrased / rewritten the content of some of those e-mails below. One of the best ways to implement the database storage of PHP session [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jordanhall.co.uk/wp-content/uploads/2011/06/php-and-mysql-logos.gif"><img class="alignright size-thumbnail wp-image-1276" title="PHP and MySQL logos" src="http://jordanhall.co.uk/wp-content/uploads/2011/06/php-and-mysql-logos-150x150.gif" alt="PHP and MySQL logos" width="150" height="150" /></a>I&#8217;ve recently exchanged e-mails with a colleague regarding the storage of PHP sessions data in a MySQL database. To help anyone else interested in using database storage of PHP session information, I have paraphrased / rewritten the content of some of those e-mails below.</p>
<p>One of the best ways to implement the database storage of PHP session data is via the overriding session handlers built in to PHP. PHP has functions built in to allow you to override the default file based session handlers.</p>
<p>These functions all use PHP&#8217;s normal ways of handling session persistence between the client and the server (by default, via the use of a session ID cookie).</p>
<p>In other words, it utilises the same PHPSESSID cookie that the default file based session storage uses. When using functions that override the session handlers, the first parameter for several of these function is the session id. Upon overriding the functions, PHP will automatically pass the session ID (pulled from the PHPSESSID cookie) to these functions.</p>
<p>The code linked to below can be &#8216;required&#8217; (require &#8220;session_start.php&#8221;) as a drop in replacement for the default PHP session_start() function. This utilises database access to store and retrieve session information. Note that due to the very early point in which PHP processes session handler overrides, objects are not available for use, hence the use of old style &#8216;mysql&#8217; instead of OO based &#8216;mysqli&#8217; (if you find a way around this, I&#8217;d be very interested in hearing about it).</p>
<p style="text-align: center;"><strong><a title="Session Start PHP code" href="http://jordanhall.co.uk/content/sessionstart.txt" target="_blank">Download &#8216;session_start.php&#8217; for database storage of session data</a></strong></p>
<p style="text-align: center;"><strong><a title="SQL Database Table Structure" href="http://jordanhall.co.uk/content/sessionstart_requiredsql.txt" target="_blank">Required Table Structure SQL</a></strong></p>
<p>In terms of performance, there is limited degradation to using database stored sessions with most small to mid range sites, based on my experience and observation. However, larger sites may possiblynotice degradation. In such circumstances, this would likely be related to the MySQL database server load and/or high levels of IO on the MySQL server. Issues of database server load can be mitigated via one or more of the following:</p>
<ul>
<li>Separation of the site database and the session storage database (seperating each to their own server if necessary)</li>
<li>File based caching of session information on the web server system (using standard PHP file reading/writing functions, ensuring that the file cache is updated whenever there are changes to the session information in the database store)</li>
<li>In memory caching (similar to file based caching, but utilising a key to value storage engine which runs in RAM, providing very fast (atomic) access to data) &#8211; using a system such as memcached - <a href="http://memcached.org/" target="_blank">http://memcached.org/</a></li>
</ul>
<p>For building reasonable size websites in which portability is important, the need to load balance is highly probably in the future and where development time permits, I&#8217;d  personal recommend database storage for session information, due to the higher level of flexibility this set-up offers.</p>
<p>I hope this information helps anyone looking to make a PHP powered site just that little bit more portable by placing their users&#8217; session data in a database.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/programming/storing-php-session-data-in-a-database-20061251/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Updates to Contacular PHP Contact Forms &#8211; Now at version 0.15</title>
		<link>http://jordanhall.co.uk/web-applications-cloud-computing/update-to-contacular-5903623/</link>
		<comments>http://jordanhall.co.uk/web-applications-cloud-computing/update-to-contacular-5903623/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 22:07:59 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Web, Applications & Cloud Computing]]></category>
		<category><![CDATA[contact form]]></category>
		<category><![CDATA[Contacular]]></category>
		<category><![CDATA[Contacular PHP contact form]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP class]]></category>
		<category><![CDATA[PHP contact forms]]></category>
		<category><![CDATA[PHP scripts]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=623</guid>
		<description><![CDATA[I&#8217;ve posted about Contacular a while ago. Contacular is my solution to the problem of reinventing the wheel for PHP-powered contact forms on websites. It allows you to quick and easily create a fully functional, e-mailing, self-validating contact form that you can integrate with any website that is on PHP enabled server. If you&#8217;re interested [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://contacular.co.uk/download-contacular.php"><img class="alignright size-full wp-image-624" title="Contacular PHP contact-forms website screenshot" src="http://jordanhall.co.uk/wp-content/uploads/2010/03/Contacular-PHP-contact-forms-website.png" alt="Contacular PHP contact-forms website" width="232" height="194" /></a>I&#8217;ve <a href="http://jordanhall.co.uk/web-applications-cloud-computing/contacular-php-contact-form-0602504/">posted about Contacular a while ago</a>. Contacular is my solution to the problem of reinventing the wheel for PHP-powered contact forms on websites. It allows you to quick and easily create a fully functional, e-mailing, self-validating contact form that you can integrate with any website that is on PHP enabled server. If you&#8217;re interested already, head straight to <a title="PHP contact form" href="http://contacular.co.uk/">Contacular contact form website</a> and <a href="http://contacular.co.uk/download-contacular.php">download Contacular</a> right now.</p>
<p>So, what is new in Contacular since my last post? Quite a bit actually. It is now at version 0.15 and has the following additional features.</p>
<ol>
<li>Fully <a href="http://contacular.co.uk/demo/bespoke-custom-php-contact-forms.php">bespoke, <strong>custom contact forms</strong></a> for your websites, allowing to define custom fields for your contact forms</li>
<li><strong>File upload</strong> field type meaning your users can upload an image or document to your contact form and it will be quickly e-mailed to you</li>
<li>Ability to <strong>restrict file uploads to specific types</strong> for added security</li>
<li>Use of a <strong>PHP mailer class</strong> to increase flexibility instead of using the default PHP mail() function</li>
<li>Added <strong>multiple preset form types</strong> for near instant integrations.</li>
<li>Many <strong>code improvements</strong> and optimisations</li>
</ol>
<p>For all other changes that have happened in Contacular, take a look at the <a href="http://contacular.co.uk/download-contacular.php">Contacular change log</a>.</p>
<p>I&#8217;m still getting lots of feedback in about Contacular and am continually working to improve it. So tell me what you think in the comments below, or <a href="http://contacular.co.uk/contact.php">contact me regarding Contacular directly</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/web-applications-cloud-computing/update-to-contacular-5903623/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Contacular PHP Contact Form</title>
		<link>http://jordanhall.co.uk/web-applications-cloud-computing/contacular-php-contact-form-0602504/</link>
		<comments>http://jordanhall.co.uk/web-applications-cloud-computing/contacular-php-contact-form-0602504/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 18:03:06 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[Web, Applications & Cloud Computing]]></category>
		<category><![CDATA[contact form]]></category>
		<category><![CDATA[Contacular]]></category>
		<category><![CDATA[Contacular PHP contact form]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[open source software]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[PHP contact form]]></category>
		<category><![CDATA[PHP form processors]]></category>
		<category><![CDATA[web contact form]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=504</guid>
		<description><![CDATA[This is just a quick post to announce the recent start of one of my recent open source projects, Contacular. I have been building up Contacular&#8217;s overall feature set over the past week, having made the initial release on the 25th of January 2010. I now believe it is worthy of a post here, based [...]]]></description>
			<content:encoded><![CDATA[<p>This is just a quick post to announce the recent start of one of my recent open source projects, <a href="http://contacular.co.uk/">Contacular</a>. I have been building up Contacular&#8217;s overall feature set over the past week, having made the initial release on the 25th of January 2010. I now believe it is worthy of a post here, based on the large influx of recent visitors to the Contacular website.</p>
<h3>So, what is Contacular?</h3>
<p><a href="http://jordanhall.co.uk/wp-content/uploads/2010/02/contacular-bot1.jpg"><img class="alignright size-full wp-image-510" title="Contacular bot" src="http://jordanhall.co.uk/wp-content/uploads/2010/02/contacular-bot1.jpg" alt="Contacular PHP contact form bot" width="180" height="240" /></a>Contacular is an open source contact form generator and processor written in <a href="http://jordanhall.co.uk/tag/PHP/">PHP</a>. It is designed to be used as either a complete <a href="http://contacular.co.uk">PHP contact form</a> solution, with full validation and e-mailing, or as an initial code base for web development to build upon. I&#8217;ve designed Contacular to be really simple to get up and running with and yet still be very expandable. The entire system is object-orientated and open source licensed.</p>
<p>A quick overview of the <a href="http://contacular.co.uk/contacular-features.php">features of Contacular</a>:</p>
<ol>
<li>Fully integrated contact form solution</li>
<li>Simple generation of contact forms</li>
<li>Many built-in Contacular contact form types</li>
<li>Integrated <a href="http://recaptcha.net">reCAPTCHA</a> human check / spam protection support</li>
<li>Adoption of existing website styling (CSS) wherever possible</li>
<li>Form field validation in all forms</li>
<li>Automatic validation error reporting</li>
<li>Advanced validation &#8211; e.g. checking submitted e-mail addresses are from real domains</li>
<li>E-mailing form results to one or more recipients</li>
<li>GPL licensed, open source, object orientated code base</li>
<li>Tested in multiple browsers on multiple platforms</li>
<li>Seamless upgrading to new versions &#8211; just download and replace the files</li>
<li>Easily expandable</li>
<li>More on the way&#8230;</li>
</ol>
<p>Take a look at the <a href="http://contacular.co.uk/how-to-use-contacular-tutorial.php">how to use Contacular</a> guide, and if you&#8217;re interested, go ahead and <a href="http://contacular.co.uk/download-contacular.php">download Contacular</a>. The latest version is always at the top, with that download page also containing the <a href="http://contacular.co.uk/download-contacular.php">Contacular change log</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/web-applications-cloud-computing/contacular-php-contact-form-0602504/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t be evil licensing</title>
		<link>http://jordanhall.co.uk/general-articles/dont-be-evil-licensing-1301401/</link>
		<comments>http://jordanhall.co.uk/general-articles/dont-be-evil-licensing-1301401/#comments</comments>
		<pubDate>Fri, 01 Jan 2010 21:57:13 +0000</pubDate>
		<dc:creator>Jordan Hall</dc:creator>
				<category><![CDATA[General Articles]]></category>
		<category><![CDATA[Do not evil]]></category>
		<category><![CDATA[Douglas Crockford]]></category>
		<category><![CDATA[Evil]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Code]]></category>
		<category><![CDATA[JSMin]]></category>
		<category><![CDATA[JSMin-PHP]]></category>
		<category><![CDATA[licensing]]></category>
		<category><![CDATA[MIT]]></category>
		<category><![CDATA[MIT license]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[open source licensing]]></category>
		<category><![CDATA[open source software]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Ryan Groove]]></category>

		<guid isPermaLink="false">http://jordanhall.co.uk/?p=401</guid>
		<description><![CDATA[Google, who brought forward the specifics of the &#8216;do no evil&#8217; ideology within consumer visible software, is refusing to host an open-source project due to slight, almost humorous, modifications to its license, denying &#8216;evil&#8217; use of the licensed software. Douglas Crockford selected the MIT license for his JSMin program to reduce JavaScript code syntax in such a way to make it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://jordanhall.co.uk/wp-content/uploads/2010/01/evil-inside.jpg"><img class="alignright size-medium wp-image-402" title="Evil Inside Intel Logo" src="http://jordanhall.co.uk/wp-content/uploads/2010/01/evil-inside-300x275.jpg" alt="Evil Inside Intel Logo" width="151" height="139" /></a>Google, who brought forward the specifics of the &#8216;do no evil&#8217; ideology within consumer visible software, is refusing to host an open-source project due to slight, almost humorous, modifications to its license, denying &#8216;evil&#8217; use of the licensed software.</p>
<p>Douglas Crockford selected the MIT license for his <a href="http://www.crockford.com/javascript/jsmin.html">JSMin</a> program to reduce JavaScript code syntax in such a way to make it still functionally identical but smaller in size to enable bandwidth savings when these JavaScript files are downloaded by end-users&#8217; web browsers. <a href="http://wonko.com/page/about">Ryan Grove</a> continued to utilise this license for his variation of JSMin called <a href="http://github.com/rgrove/jsmin-php/">JSMin-PHP</a>, appropriately rewritten in the PHP language. This specific license however, contains a variation from the original MIT open-source license, as it includes the following line of text, originally inserted into the license for assumed comical value.</p>
<blockquote><p>&#8220;The Software shall be used for Good, not Evil.&#8221;</p></blockquote>
<p>Since Google&#8217;s code hosting solution, imaginatively called &#8216;Google Code&#8217; only allows hosting of code licensed under very specific open-source licenses, this single modification acts an additional condition which Google is not willing to accept. This means JSMin-PHP can not be hosted at Google Code simply due to this licensing issue.</p>
<p>The developer of JSMin-PHP, Ryan Groove has the following to say about this, on <a href="http://wonko.com/post/jsmin-isnt-welcome-on-google-code">his blog</a>.</p>
<blockquote><p>&#8220;As Google (and some others) interpret it, this additional requirement constitutes a vague use restriction and thus makes the license non-free. Chris [DiBona] explained that if I were to remove that line from the license and &#8216;return to a proper open source license that we support,&#8217; then jsmin-php could stay on Google Code. Otherwise, he said, &#8216;we can&#8217;t host you,&#8217;</p>
<p>&#8230; Of course, I can&#8217;t change the license, because it&#8217;s not my license. It&#8217;s Douglas&#8217;s license&#8230; All derivative works and copies of jsmin.c either include this license or are in violation of it.&#8221;</p></blockquote>
<p>If you are using Google Code to host your project, be warned, Google are very tight on their licensing restrictions. What do you think? Valid reasoning or over the top enforcement of open-source licensing terms?</p>
]]></content:encoded>
			<wfw:commentRss>http://jordanhall.co.uk/general-articles/dont-be-evil-licensing-1301401/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

