<?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>Full On Design &#187; PHP</title>
	<atom:link href="http://www.fullondesign.co.uk/tag/php/feed" rel="self" type="application/rss+xml" />
	<link>http://www.fullondesign.co.uk</link>
	<description>Design &#38; Web Technologies</description>
	<lastBuildDate>Mon, 21 Jun 2010 16:45:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>5 changes I would like to see in 2010</title>
		<link>http://www.fullondesign.co.uk/design/inspiration/1246-4-changes-i-would-like-to-see-in-2010.htm</link>
		<comments>http://www.fullondesign.co.uk/design/inspiration/1246-4-changes-i-would-like-to-see-in-2010.htm#comments</comments>
		<pubDate>Wed, 16 Dec 2009 01:24:17 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Inspiration]]></category>
		<category><![CDATA[Attribute]]></category>
		<category><![CDATA[Chat System]]></category>
		<category><![CDATA[Desktop Application]]></category>
		<category><![CDATA[Developers]]></category>
		<category><![CDATA[Double Edge Sword]]></category>
		<category><![CDATA[Javascript Libraries]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Pop Ups]]></category>
		<category><![CDATA[Screen Readers]]></category>
		<category><![CDATA[Users Experience]]></category>
		<category><![CDATA[Video Stream]]></category>

		<guid isPermaLink="false">http://www.fullondesign.co.uk/?p=1246</guid>
		<description><![CDATA[2009 has been a somewhat interesting year for the internet; it&#8217;s become more mobile &#38; more user friendly. However here are a few ideas I have had over the year, which I would like to see arrive in 2010. Video Stream Caching One of the big annoyances I have with streaming video files (normally on [...]]]></description>
			<content:encoded><![CDATA[<p>2009 has been a somewhat interesting year for the internet; it&#8217;s become more mobile &amp; more user friendly. However here are a few ideas I have had over the year, which I would like to see arrive in 2010.</p>
<h3>Video Stream Caching</h3>
<p>One of the big annoyances I have with streaming video files (normally on websites such as YouTube &amp; Megavideo) is whenever I go to jump to another section of the video I lose what I currently have already loaded. It would be really useful if I could quickly go back to the section I&#8217;ve previously loaded.</p>
<p><a href="http://www.fullondesign.co.uk/wp-content/uploads/2009/12/video_stream_caching.png"><img class="aligncenter size-full wp-image-1254" title="video_stream_caching" src="http://www.fullondesign.co.uk/wp-content/uploads/2009/12/video_stream_caching.png" alt="video_stream_caching" width="500" height="320" /></a><br />
 <em>This is a mock up I done, the video I used is from </em><a href="http://www.youtube.com/watch?v=IKATXdRD4d0">RayWilliamJohnson</a></p>
<p>I&#8217;m quite sure this would need to be implemented by the software, but I can&#8217;t see how it would be difficult to add.</p>
<p><span id="more-1246"></span></p>
<h3>Facebook &#8211; Pop-up chat</h3>
<p>Pop-ups are a double edge sword; on the one hand they have been used incorrectly and become an utter annoyance. But on the other, they also can drastically improve a users experience with a website. For example the Facebook chat system is very inconvenient as I have to be looking at a Facebook page to talk to people. On a big screen this might not be a big issue, but on a small screen this makes it surprisingly difficult to  multi-task.</p>
<p style="text-align: center;"><a href="http://www.fullondesign.co.uk/wp-content/uploads/2009/12/facebook_chat_problem.png"><img class="aligncenter size-full wp-image-1258" title="facebook_chat_problem" src="http://www.fullondesign.co.uk/wp-content/uploads/2009/12/facebook_chat_problem.png" alt="facebook_chat_problem" width="597" height="445" /></a><em>Oh noes! I can&#8217;t see the chat &amp; watch the video</em></p>
<p>However, if Facebook make the chat system as a desktop application or just available in a pop-up I suspect that would solve issue.</p>
<p style="text-align: center;"><a href="http://www.fullondesign.co.uk/wp-content/uploads/2009/12/facebook_chat_popup_mockup.png"><img class="size-full wp-image-1263 alignnone" title="facebook_chat_popup_mockup" src="http://www.fullondesign.co.uk/wp-content/uploads/2009/12/facebook_chat_popup_mockup.png" alt="facebook_chat_popup_mockup" width="251" height="376" /> </a><a href="http://www.fullondesign.co.uk/wp-content/uploads/2009/12/facebook_chat_popup_mockup_button_on_fb.png"><img class="size-full wp-image-1268 alignnone" title="facebook_chat_popup_mockup_button" src="http://www.fullondesign.co.uk/wp-content/uploads/2009/12/facebook_chat_popup_mockup_button_on_fb.png" alt="facebook_chat_popup_mockup_button" width="237" height="315" /></a></p>
<h3>JavaScript Library Integrated into browsers</h3>
<p>It seems silly that I have to keep re-downloading the same file (A Javascript Library) to make a webpage more exciting. I would love to see not just jQuery, but most JavaScript libraries integrated into browsers (maybe as a add-on or something?) to speed up the download times of webpages.</p>
<p>On the other hand, it could be time to consider a new browser based language which is designed to make surfers &amp; developers lives easier. For example adding a new attribute to html forms which allowed for browser specific (so people with screen readers will not be disadvantaged) validation.</p>
<pre class="brush: xml;">
&lt;form&gt;
&lt;fieldset&gt;
&lt;label&gt;Phone Number:
&lt;input name=&quot;price&quot; type=&quot;text&quot; value=&quot;090 111 050&quot; /&gt;&lt;/label&gt;
&lt;/fieldset&gt;
&lt;/form&gt;
</pre>
<h3>OpenID/Facebook Connect &#8211; More widely adopted</h3>
<p>I hate having to sign up to websites, especially when I could just as easily use a login details from a single source. It would be really cool if more websites allowed for a &#8220;one click registration&#8221; option.</p>
<h3>Adobe Flash &#8211; Video Player Standardization</h3>
<p>One of my biggest pet hates is going onto a nice website just to find features I expect to find, or actions I believe are normal are just not present on the video players. For example I think it is normal for a click on a video to mean &#8220;pause&#8221; and a double click to go to full screen mode. I think this is just something Web Developers need to consider.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fullondesign.co.uk/design/inspiration/1246-4-changes-i-would-like-to-see-in-2010.htm/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Handling Errors In PHP</title>
		<link>http://www.fullondesign.co.uk/coding/php/736-handling-errors-in-php.htm</link>
		<comments>http://www.fullondesign.co.uk/coding/php/736-handling-errors-in-php.htm#comments</comments>
		<pubDate>Wed, 03 Jun 2009 18:44:14 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[error handling]]></category>
		<category><![CDATA[php class]]></category>

		<guid isPermaLink="false">http://www.fullondesign.co.uk/?p=736</guid>
		<description><![CDATA[Handling errors in PHP can be quite a handful at times. Here is a really simple PHP class which I use to manage errors: &#60;?php /* errors class - Helps management of errors in a script. @version 1.0 @author Mike Rogers (FullOnDesin.co.uk) @last updated 03 June 2009 @usage You are free to share, modify and [...]]]></description>
			<content:encoded><![CDATA[<p>Handling errors in PHP can be quite a handful at times. Here is a really simple PHP class which I use to manage errors:</p>
<pre class="brush: php;">&lt;?php
/*
errors class - Helps management of errors in a script.

@version
	1.0
@author
	Mike Rogers (FullOnDesin.co.uk)
@last updated
	03 June 2009
@usage
	You are free to share, modify and use this code for commercial or non-commercial uses.
	Please give a link back (to http://www.fullondesign.co.uk/ ) if you can, but you don't have you.
	You use this at your own risk.
*/
class errors {
	var $errors_data;

	/*
	Add the error from $new_error into an array of errors.

	@param
		$new_error	string The text related to your error.
	@return:
		True - Error has been Added
	@example
		add_error('Username is Incorrect');
	*/
	public function add_error($new_error){
		$this-&gt;errors_data[] = $new_error;
		return TRUE;
	}

	/*
		Outputs the errors.

	@param
		None
	@return:
		- A div (ID - error) which contains the errors.
		NULL - No errors
	@example
		echo output_errors();
	*/
	public function output_errors(){
		if(is_array($this-&gt;errors_data)){
			// Cycle through the errors.
			foreach($this-&gt;errors_data as $error)	{
				$return .= '&lt;p&gt;'.$error.'&lt;/p&gt;';
			}
		// Add it to the error div
		return '&lt;div id=&quot;error&quot;&gt;'.$return.'&lt;/div&gt;';
		}
		return NULL;
	}
}

// @Example - creating the class:
$errors = new errors;

// @Example - Add an error
$errors-&gt;add_error('Username is incorrect');

// @Example - Return the errors
echo $errors-&gt;output_errors();
?&gt;</pre>
<p>If you are looking to fully integrate a script similar to the above, there is a really good post regarding the <a href="http://uk3.php.net/manual/en/function.set-error-handler.php">set_error_handler()</a> function on <a href="http://tinsology.net/2009/04/php-error-handling/">Tinsology ( PHP Error Handling )</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fullondesign.co.uk/coding/php/736-handling-errors-in-php.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Making a simple Facebook Application</title>
		<link>http://www.fullondesign.co.uk/coding/php/311-making-a-simple-facebook-application.htm</link>
		<comments>http://www.fullondesign.co.uk/coding/php/311-making-a-simple-facebook-application.htm#comments</comments>
		<pubDate>Tue, 05 May 2009 16:35:53 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook application]]></category>

		<guid isPermaLink="false">http://www.fullondesign.co.uk/?p=311</guid>
		<description><![CDATA[In this quick tutorial I&#8217;m going to show you how to make a simple &#8220;return all&#8221; application for facebook. Before you start take a look at the Facebook Developers page and the Facebook Developers Wiki as it&#8217;s full of useful stuff. The Core Components API &#8211; Lets you talk to the facebook servers. [put picture [...]]]></description>
			<content:encoded><![CDATA[<p>In this quick tutorial I&#8217;m going to show you how to make a simple &#8220;return all&#8221; application for facebook. Before you start take a look at the <a href="http://developers.facebook.com/" target="_blank">Facebook Developers</a> page and the <a href="http://wiki.developers.facebook.com/index.php/Main_Page" target="_blank">Facebook Developers Wiki</a> as it&#8217;s full of useful stuff.</p>
<h3>The Core Components</h3>
<ul>
<li>API &#8211; Lets you talk to the facebook servers. [put picture here explaining in detail]</li>
<li>FBML &#8211; Facebook markup language, it&#8217;s like a cute little html snippet which facebook turns into normal HTML.</li>
<li>XFBML &#8211; A javascript which lets you use FBML in iframes.</li>
<li>FQL &#8211; Lets you run SQL type query&#8217;s.</li>
<li>FBJS &#8211; This changes your javascript so you can only work within a close environment.</li>
<li><a href="http://svn.facebook.com/svnroot/platform/clients/packages/" target="_blank">PHP Client Libraries</a> &#8211; The PHP Facebook provides to communicate with their servers.</li>
</ul>
<p><span id="more-311"></span></p>
<h3>The fun stuff<strong><br />
 </strong></h3>
<p>Assuming you have downloaded the required files, you can now start playing with the facebook API. Here is the basic shell for any Facebook application:</p>
<pre class="brush: php;">&lt;?php
# Start by Defining everything the code needs to talk to facebook. Facebook provides these when you sign up.
define(YOUR_API_KEY, '');
define(YOUR_SECRET_CODE, '');

// Include the facebook API PHP classes.
require_once('facebook.php');

// Connect to facebook
$facebook = new Facebook(YOUR_API_KEY,YOUR_SECRET_CODE);

// Return everything facebook has sent to you.
echo '
&lt;pre'.'&gt;Debug:' . print_r($facebook,true) . '&lt;/pre'.'&gt;';
?&gt;
</pre>
<p>As you guessed, that does basically just returns the data sent by facebook. If you want to try this out yourself, take a look at the <a href="http://www.facebook.com/developers/">Facebook Developer App</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fullondesign.co.uk/coding/php/311-making-a-simple-facebook-application.htm/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple PHP Download Counter</title>
		<link>http://www.fullondesign.co.uk/coding/php/770-simple-php-download-counter.htm</link>
		<comments>http://www.fullondesign.co.uk/coding/php/770-simple-php-download-counter.htm#comments</comments>
		<pubDate>Sat, 25 Apr 2009 00:06:04 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Download Counter]]></category>

		<guid isPermaLink="false">http://www.fullondesign.co.uk/?p=770</guid>
		<description><![CDATA[Here is a really easy and lightweight way of logging the amount of downloads. &#60;?php # File created on 25th April 2009 by Mike Rogers (http://www.fullondesign.co.uk/). ## Start defining constants ## define(LOG_URL, '/home/user/download_logs/'); // Put the location of where you want to put the logs. Make sure this is absolute # $_GET['ID'] - this is [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a really easy and lightweight way of logging the amount of downloads.</p>
<pre class="brush: php;">&lt;?php # File created on 25th April 2009 by Mike Rogers (http://www.fullondesign.co.uk/). 

## Start defining constants ##
define(LOG_URL, '/home/user/download_logs/'); // Put the location of where you want to put the logs. Make sure this is absolute
# $_GET['ID'] - this is the ID of the file we want. It gets the value from the URL.

## Now set the data you wish to use - this can be moved to an include if you want ##
$file[0] = 'http://www.example.com/file.pdf';

## Define the functions required to update the file.
function update_file($filename, $value){
	if(is_writable($filename) &amp;&amp; is_readable($filename)){
		if(file_put_contents($filename, $value)){
			return TRUE;
		}
	}
	return NULL;
}
function pull_file($filename){
	if(is_writable($filename) &amp;&amp; is_readable($filename)){
		return file_get_contents($filename);
	}
	return NULL;
}
function rebuild_file($filename){
	if(is_writable($filename) &amp;&amp; is_readable($filename)){
		file_put_contents($filename, '1');
	}
}

if(is_numeric($_GET['ID'])){ // Meaning the Data sent is safe.

	// Build log file URL
	$filename = LOG_URL.$_GET['ID'].'.log.txt';
	$value = pull_file($filename);

	header('location:'.$file[$_GET['ID']]);

	// Update logs
	if(is_numeric($value)){
		update_file($filename, ($value+1));
	} else { // Meaning the file does not exist or has been messed with.
		rebuild_file($filename);
	}
} else {
	echo 'Sorry, there was an error.';
}

/* If you want to see how many people have downloaded a file, run something like:
# pull_file(LOG_URL.numberishere.'.log.txt');
/*

You are free to share, modify and use this code for commercial uses. Please give a link back (to http://www.fullondesign.co.uk/ ) if you can, but you don't have you.

I claim no liability for this code, you use it at your own risk.

*/

?&gt;</pre>
<p>You can run this by changing the URL that accesses the file. For example:<br />
<em>file.php?ID=0</em></p>
<p>Feel free to edit and share this code.<br class="spacer_" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.fullondesign.co.uk/coding/php/770-simple-php-download-counter.htm/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
