<?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>PHP, Web and IT stuff</title>
	<atom:link href="http://www.webdigi.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webdigi.co.uk/blog</link>
	<description>Little words of wisdom</description>
	<lastBuildDate>Thu, 22 Mar 2012 11:04:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Using an iOS device to control a game on your browser</title>
		<link>http://www.webdigi.co.uk/blog/2012/using-an-ios-device-to-control-a-game-on-your-browser/</link>
		<comments>http://www.webdigi.co.uk/blog/2012/using-an-ios-device-to-control-a-game-on-your-browser/#comments</comments>
		<pubDate>Mon, 19 Mar 2012 15:10:29 +0000</pubDate>
		<dc:creator>php-manual</dc:creator>
				<category><![CDATA[Javascript Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[accelerometer]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[ios]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=858</guid>
		<description><![CDATA[Accelerometer support is available in Mobile Safari and this enables the browser to sense movement, speed and direction with Javascript on iPhone and iPad devices. If we push the movement data from the iOS device instantly through a nodejs server to a browser, then we can control a game on the browser. This is exactly [...]]]></description>
			<content:encoded><![CDATA[<p>Accelerometer support is available in Mobile Safari and this enables the browser to sense movement, speed and direction with Javascript on iPhone and iPad devices. If we push the movement data from the iOS device instantly through a nodejs server to a browser, then we can control a game on the browser. This is exactly what we have put together in this <a title="HTML5 game with iOS accelerometer integration" target="_blank" href="http://www.webdigi.co.uk/fun/space/">fun little html5 demo</a>.</p>
<div id="attachment_859" class="wp-caption aligncenter" style="width: 523px"><a href="http://www.webdigi.co.uk/fun/space/" target="_blank"><img class="size-full wp-image-859" title="HTML5 iOS device controller game" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2012/03/game.png" alt="" width="513" height="234" /></a><p class="wp-caption-text">Try the HTML5 game demo</p></div>
<p>Try the game before you go through the components that make up this demo.</p>
<p><strong>iPhone / iPad controller</strong></p>
<div id="attachment_873" class="wp-caption aligncenter" style="width: 266px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2012/03/photo.png"><img class="size-full wp-image-873" title="iPhone controller" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2012/03/photo.png" alt="" width="256" height="296" /></a><p class="wp-caption-text">Controller running on an iPhone</p></div>
<p>The user scans the QR code or visits the unique link created for them from the demo landing page to start the controller. The controller code reads accelerometer values and then passes the movement to the nodejs server.</p>
<p>Key parts of the iOS device controller code</p>
<pre class="brush: jscript; title: ; notranslate">
//Detect if the browser supports DeviceMotionEvent
if (window.DeviceMotionEvent != undefined) {
//ondevicemotion is fired when iOS device detects motion
  window.ondevicemotion = function(e) {
//ax is the movement on the x axis.
//This motion is used to move the ship in the game
  ax = event.accelerationIncludingGravity.x * 5;
  ay = event.accelerationIncludingGravity.y * 5;

//Status 0 is start, 1 is left, 2 is right, 3 is stay
if(status == 0){ //initial condition
  status = 3; //stay
  socket.emit('spaceChange', {'ax': 3});
  statusmsg = 'Waiting for movement';
}
if(ax &gt; 14 &amp;&amp; status != 2){ //move right on device
  status = 2;
  socket.emit('spaceChange', {'ax': 2});
  statusmsg = 'Moving ship right';
}
if(ax &lt; -14 &amp;&amp; status != 1){ //move left on device
  status = 1;
  socket.emit('spaceChange', {'ax': 1});
  statusmsg = 'Moving ship left';
}
if(ax &gt; -14 &amp;&amp; ax &lt; 14 &amp;&amp; status != 3){ //device held steady
  status = 3;
  socket.emit('spaceChange', {'ax': 3});
  statusmsg = 'Ship held steady';
}
</pre>
<p>The controller code detects movement from accelerometer and only pushes data to the nodejs server if there is a change in direction of the device. This reduces the data pushed from the phone to the server when compared to sending  all the live accelerometer values to server. Finally, the value 14 in ax is set as a threshold to detect if the user is moving the device to the left or right.</p>
<p><strong>Node.js server with SocketIO (Server side)</strong></p>
<p>Node.js is a server-side JavaScript environment based on Google&#8217;s V8 Javascript engine. Programs are written in JavaScript, using event-driven, asynchronous I/O to minimize overhead and maximize scalability.  Socket.IO sits on top of Node.js and makes it easy to deliver realtime data between almost every browser and the node server. Socket.IO code runs on the server and the client side. This makes Node.js and Socket.IO ideal candidates to be able push accelerometer values instantly from mobile safari to the desktop browser.</p>
<p>Each visitor to the game landing page is assigned an unique random id that links the browser and the iOS safari instance. User loads the URL provided on their iOS device and then safari detects accelerometer motion, which is then pushed by socket.io on client side to the node server. The randomly generated id is used as a room for the user so that push from user device is only sent to a particular browser.</p>
<p>Server side Socket.IO code </p>
<pre class="brush: jscript; title: ; notranslate">
//Start on connection
io.sockets.on('connection', function (socket) {

 //Set room for user when connection is made
 socket.on('setChannel', function (data) {
 socket.join(data.channelName);
 });

 //When iOS device moves send data to browser
 //Multiple browsers can be listening to same device
 socket.on('spaceChange', function (data) {
 socket.broadcast.to(data.channelName)
                   .emit(&quot;spaceChanges&quot;,data);
 });

});
</pre>
<p><strong>Browser game and client side Socket.IO</strong></p>
<p>The browser game can be played with the keyboard arrows or with iOS device movement. The space invaders game itself behaves like a standard HTML5 game which uses HTML canvas. Thanks to Erop Balyshev for developing the well tested game in a couple of days. The html game code is commented and you should be able to understand the underlying code for the game quite easily. The socket communication and movement based on feedback from the iOS device was later plugged into the game code.</p>
<p>Code below shows how data from server is handled on the browser.</p>
<pre class="brush: jscript; title: ; notranslate">
//iOS detection and corresponding action
var lastkey = 37;
var dataStart=0;
  socket.on('connect', function() {
   //if sockets gets disconnected then mention room again
   socket.emit('setChannel',
              {'channelName': '&lt;?php echo $randRoom; ?&gt;'});
  });

  socket.on('spaceChanges', function (data) {
     if(dataStart == 0){
        //First movement data arrived
        document.getElementById('status').innerHTML
                  = 'Receiving data from your iOS device';
        dataStart = 1;
     }
    ax = data.ax;
    var	posob=new Object();
    if(ax == 2){
        //move right
        lastkey = 39;
    	posob.keyCode = lastkey;
        posob.type = 'keydown';
        document.getElementById('status').innerHTML
                   = 'iOS device tilted right';
    }
    if(ax == 1){
        //move left
        lastkey = 37;
    	posob.keyCode = lastkey;
        posob.type = 'keydown';
        document.getElementById('status').innerHTML
                   = 'iOS device tilted left';
    }
    if(ax == 3){
        //hold ship in place
    	posob.keyCode = lastkey;
	posob.type = 'keyup';
        document.getElementById('status').innerHTML
                   = 'iOS device held steady';
    }
    //Send action received above
    keypressaction(posob);
  });	

//Fire automatically once first data starts
window.setInterval(function(){
  if(dataStart == 1){
    var posob=new Object();
    posob.keyCode = 32;
    posob.type = 'keydown';
    keypressaction(posob);
    posob.keyCode = 32;
    posob.type = 'keyup';
    keypressaction(posob);
  }
//Timer is correctly a shot ever 200ms.
//Decrease 200 to lower for even faster firing!
}, 200);
</pre>
<p><strong>Conclusions</strong></p>
<p>- We are very impressed with the instant movement detection and control over the game.<br />
- You can also run multiple browsers on your desktop with the same id get parameter and have it all controlled with the same iOS controller.<br />
- Current space invaders game uses only X axis movement on the iOS device. However, all three dimension values are available on iOS safari ondevicemotion method. It is technically possible to do much more with the iOS device. Probably the ship can fire when user shakes the device?</p>
<p>Enjoyed the demo? Looking forward to your feedback and ideas.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2012/using-an-ios-device-to-control-a-game-on-your-browser/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Cool new stuff in PHP 5.4</title>
		<link>http://www.webdigi.co.uk/blog/2012/cool-new-stuff-in-php-5-4/</link>
		<comments>http://www.webdigi.co.uk/blog/2012/cool-new-stuff-in-php-5-4/#comments</comments>
		<pubDate>Fri, 02 Mar 2012 17:05:27 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[traits]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=835</guid>
		<description><![CDATA[PHP 5.4 was released yesterday. It took nearly 2 years since the release of version 5.3 and has been a huge undertaking. Congratulations to the guys that made it happen. Let&#8217;s take a look at the features: 1) Speed PHP 5.4 is the fastest of all PHP versions. Benchmarks both Synthetic and real-life show a [...]]]></description>
			<content:encoded><![CDATA[<p>PHP 5.4 was released yesterday. It took nearly 2 years since the release of version 5.3 and has been a huge undertaking. Congratulations to the guys that made it happen. Let&#8217;s take a look at the features:</p>
<p><strong>1) Speed<br />
</strong>PHP 5.4 is the fastest of all PHP versions. Benchmarks both Synthetic and real-life show a pretty impressive jump in performance. Drupal, WordPress, etc are faster by almost 10% while Zend Framework was faster by 21%. There is a lot of improvement on memory usage, performance (req/sec), etc. Andy Gutmans of Zend claimed the memory foot print is also lowered by upto 35 percent (that is huge!). Read more about the <a href="http://news.php.net/php.internals/57760">tests</a> here</p>
<p><strong>2) Short echo tags<br />
</strong>Short echo tags will always work irrespective of the ini settings.</p>
<pre class="brush: php; title: ; notranslate">
&lt;?= &quot;Always works even if ini short tags are disabled&quot; ?&gt;
</pre>
<p><strong>3) Compact Array Syntax and Array Dereferencing</strong><br />
Both of these changes makes the code look much more cleaner and easier to read. Take a look at the examples below</p>
<pre class="brush: php; title: ; notranslate">
$a = [1, 2, 3]; //Same as array(1, 2, 3);

//Dereferencing
$a = &quot;Zero One Two Three Four&quot;;
echo explode(&quot; &quot;, $a)[4]; // outputs Four

//Function Array Dereferencing
function movies() {
return ['Mission Impossible', 'Transformers', 'Titanic'];
}
echo movies()[1]; //Outputs: Transformers
</pre>
<p><strong>4) How long did your script take to execute?<br />
</strong>Previously you set a start variable and store time in it. Then you write your code and compute the difference in the end. Like this</p>
<pre class="brush: php; title: ; notranslate">
$time_start = microtime(true);
// Run a lot of your code
$time_end = microtime(true);
echo &quot;Took:&quot;, $time_end - $time_start; //Time spent

// Just one line at the end of your script with PHP5.4
echo &quot;Took:&quot;, (microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']);
</pre>
<p><strong>5) Built in Web Server (CLI)</strong><br />
Well, we&#8217;ve been strongly recommended not to use this on production as this is brand new and not intended to replace Apache/nginx !</p>
<pre class="brush: powershell; title: ; notranslate">
$ php -S localhost:8080
</pre>
<p>The above shell command gets the web server running at port 8080 after setting the Document Root as the current working directory. It also serves static assets and supports URL routing.</p>
<p><strong>6) Traits</strong><br />
Traits is &#8220;compiler assisted copy-paste&#8221; literally, it is also known as &#8220;Horizontal Reuse&#8221; and similar to functionality of &#8220;Multiple Inheritance&#8221;. This implementation adds 4 new keywords: trait, use, as and insteadof. As and insteadof are used to resolve conflicts when you use multiple traits.</p>
<pre class="brush: php; title: ; notranslate">
trait sayHello { //First Trait
public function hello() { echo &quot;Hello&quot;; }
}
trait sayWorld { //Second Trait
public function world() { echo &quot;World&quot;; }
}

//Then we define the class
class sayHelloWorld {
use sayHello, sayWorld; //use brings in both Hello and World functions
}

$say = new sayHelloWorld();
$say-&gt;hello(); //Hello
$say-&gt;world(); //World
</pre>
<p><strong>Conclusion</strong><br />
No concrete plans for PHP 6 or other versions announced yet, However, there are lots of cool stuff here to get excited about. With PHP 5.4, the new Default Page Charset is now utf-8. There are other features like a callable type hint, support for $this in anonymous functions.With closures, cleaner array syntax, PHP is now looking more like Javascript.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2012/cool-new-stuff-in-php-5-4/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Build better facebook pages with iframe tabs</title>
		<link>http://www.webdigi.co.uk/blog/2011/build-better-facebook-pages-with-iframe-tabs/</link>
		<comments>http://www.webdigi.co.uk/blog/2011/build-better-facebook-pages-with-iframe-tabs/#comments</comments>
		<pubDate>Tue, 15 Feb 2011 14:22:34 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=800</guid>
		<description><![CDATA[There are two major changes announced for Facebook pages. The most prominent is the change to the the layout and fan page design (forced update due on March 10th 2011). The second is that Facebook pages now support iframes. This means that developers are free to use popular, simple and standards-based web programming model (HTML, [...]]]></description>
			<content:encoded><![CDATA[<p>There are two major changes announced for Facebook pages. The most prominent is the change to the the layout and fan page design (forced update due on March 10th 2011). The second is that Facebook pages now support iframes. This means that developers are free to use popular, simple and standards-based web programming model (HTML, JavaScript, and CSS) compared to highly restricted FBJS and FBML.  There are lots of reasons to be excited about this. Here are a few of our best:</p>
<p><strong>1) Google maps on pages</strong></p>
<p>You can now have fully functional Javascript based maps within Facebook pages. This makes it easier to display business location, location of stores, hotels, etc. To make things even more flexible, mapping services will now have access to your location if you use newer browsers.</p>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://www.facebook.com/webdigi?sk=app_163685236987027"><img class=" " title="Google maps with Location" src="http://www.webdigi.co.uk/fbframeblog/blogimages/LocationMaps.png" alt="Google maps with location on Facebook iframe tabs" width="450" height="372" /></a><p class="wp-caption-text">Google maps with Location</p></div>
<p>To see this functionality in action, go to the <a href="http://www.facebook.com/webdigi?sk=app_163685236987027">maps page</a>. You need to be logged in to Facebook to view the page. Please note that your location is not stored by us and used just to display a map for the demo purposes.</p>
<p><strong>2) Add youtube videos and other music players</strong></p>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://www.facebook.com/webdigi?sk=app_178775035499585&amp;app_data=video"><img class="   " title="Embed Youtube Videos on fan pages" src="http://www.webdigi.co.uk/fbframeblog/blogimages/Youtube.png" alt="Embed Youtube Videos on fan pages" width="450" height="331" /></a><p class="wp-caption-text">Embed Youtube Videos on fan pages</p></div>
<p>The iframe technique also make it much easier to embed youtube videos and other flash/HTML5 multimedia. This gives users access to related videos and more added functionality. This also includes the ability to view the video in full screen. Click on the image above to go to the <a href="http://www.facebook.com/webdigi?sk=app_178775035499585&amp;app_data=video">video demo page</a>.</p>
<p><strong>3) Embed slides and PDFs</strong></p>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://www.facebook.com/webdigi?sk=app_178775035499585&amp;app_data=docs"><img class=" " title="Embed external docs to your fan page" src="http://www.webdigi.co.uk/fbframeblog/blogimages/Docs.png" alt="Embed external docs to your fan page" width="450" height="322" /></a><p class="wp-caption-text">Embed external docs to your fan page</p></div>
<p>Like how a video is embedded, you can now embed slides, PDF, other documents using Slideshare or related apps. Here is a direct link to the <a href="http://www.facebook.com/webdigi?sk=app_178775035499585&amp;app_data=docs">docs demo page</a>.</p>
<p><strong>4) Create amazing landing pages</strong></p>
<p>Use any Javascript library of your choice: jQuery, ExtJS, mootools, etc. You can even use flash or HTML5 to create great landing pages. In short, the only limitation on design, layout and functionality is now your imagination and the restricted width of around 520px.</p>
<p><strong>5) Create your own top navigation menu</strong></p>
<div class="wp-caption aligncenter" style="width: 460px"><img title="Create your own top level menu" src="http://www.webdigi.co.uk/fbframeblog/blogimages/navigationalmenus.png" alt="Create your own top level menu" width="450" height="152" /><p class="wp-caption-text">Create your own top level menu</p></div>
<p>The previous Facebook page design had top level navigation tabs which have now moved to the left side of the page. This does free up some space and lets the developer create their own top level navigation tab. Including multi level level navigation.</p>
<p><strong>6) Add a like button within the page</strong></p>
<div class="wp-caption aligncenter" style="width: 470px"><a href="http://www.facebook.com/webdigi?sk=app_178775035499585&amp;app_data=code"><img class=" " title="No longer need a click above to Like" src="http://www.webdigi.co.uk/fbframeblog/blogimages/cocacola.png" alt="No longer need a click above to Like" width="460" height="146" /></a><p class="wp-caption-text">No longer need a click above to Like</p></div>
<p>There are thousands of Facebook pages including top brands like Coca cola which have the text like &#8220;Click on like button above&#8221;. This will no longer be required. You can now have the like button within the page. An example is what we have on <a href="http://www.facebook.com/webdigi?sk=app_178775035499585&amp;app_data=code">our page here</a>.</p>
<p><strong>7) Special content for Facebook page fans</strong></p>
<p>You can have a special page displayed for Facebook fans. This is possible because Facebook sends a signed request to your server each time your page loads. This request from Facebook has details like user language preferences, age restrictions and also information showing if an user is a page fan, page admin, etc. All the <a href="http://www.facebook.com/webdigi?sk=app_178775035499585&amp;app_data=code">source code for all the above pages</a> is available on this page.</p>
<p><strong>Notes:</strong></p>
<p>- Our page has been updated to the new version. This is a requisite for working on the new iframe enabled facebook pages.<br />
- All the code is free to use as usual and is intended to demo the features of iframes on Facebook tabs.<br />
- You seem to need to be logged in to Facebook to be able to view the demo pages in action!<br />
- For those beginners who are not sure how to create the iframe tabs, please visit the <a href="http://developers.facebook.com/docs/guides/canvas#tabs">Facebook guide on creating pages</a></p>
<p>What features or possibilities excite you the most?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2011/build-better-facebook-pages-with-iframe-tabs/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Retain leading zero in CSV</title>
		<link>http://www.webdigi.co.uk/blog/2010/handling-leading-zero-in-csv/</link>
		<comments>http://www.webdigi.co.uk/blog/2010/handling-leading-zero-in-csv/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 11:22:09 +0000</pubDate>
		<dc:creator>php-manual</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=764</guid>
		<description><![CDATA[Most web applications at some point will have some sort of an export data feature to get data out of the database in some csv or excel format. CSV is probably the simplest to generate on the fly from PHP and other server side scripting languages. However, I had a particular issue where leading zeros [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_770" class="wp-caption aligncenter" style="width: 370px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/09/Leading_Zeros_CSV.png" target="_blank"><img class="size-medium wp-image-770  " title="Leading Zeros in CSV shown in Excel" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/09/Leading_Zeros_CSV-300x91.png" alt="Leading Zeros in Excel with CSV" width="360" height="109" /></a><p class="wp-caption-text">Leading Zeros shown in Excel when = is used (Row 3)</p></div>
<p>Most web applications at some point will have some sort of an export data feature to get data out of the database in some csv or excel format. CSV is probably the simplest to generate on the fly from PHP and other server side scripting languages. However, I had a particular issue where leading zeros were just not displaying when the csv file was opened with Excel. Look at the example csv below where when opened in Excel will not show leading zeros.</p>
<pre class="brush: jscript; title: ; notranslate">
&quot;Comment&quot;,&quot;Number&quot;,&quot;Zip&quot;
&quot;Leading Zeros will not be displayed&quot;,&quot;0003833&quot;,&quot;0596&quot;
</pre>
<p><span style="font-size: 13.3333px;">The best solution to work around this is just to add an = in front of the column to avoid Excel from formatting the column when displaying numeric value. So below works fine.</span></p>
<pre class="brush: jscript; title: ; notranslate">
&quot;Comment&quot;,&quot;Number&quot;,&quot;Zip&quot;
&quot;Leading Zeros shown in Excel&quot;,=&quot;0003833&quot;,=&quot;0596&quot;
</pre>
<p style="text-align: left;">Hope this simple trick helps you avoid Excel eating up leading zeros in csv! Any other CSV related suggestions and comments are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2010/handling-leading-zero-in-csv/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Tracking user engagement on Facebook fan pages</title>
		<link>http://www.webdigi.co.uk/blog/2010/tracking-user-engagement-on-facebook-fan-pages/</link>
		<comments>http://www.webdigi.co.uk/blog/2010/tracking-user-engagement-on-facebook-fan-pages/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 12:51:13 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook Pages]]></category>
		<category><![CDATA[Google Analytics]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=715</guid>
		<description><![CDATA[In our previous blog post we showed how to setup Google Analytics for Facebook fan pages. The article was very well received and highlighted the importance of improved analytics. Please review the older article for detailed instructions on how to setup Google Analytics. Here are a few interesting concepts which will help you build better Facebook [...]]]></description>
			<content:encoded><![CDATA[<p>In our previous blog post we showed how to setup <a href="http://www.webdigi.co.uk/blog/2010/google-analytics-for-facebook-fan-pages/">Google Analytics for Facebook fan pages</a>. The article was very well received and highlighted the importance of improved analytics. Please review the older article for detailed instructions on how to setup Google Analytics. Here are a few interesting concepts which will help you build better Facebook fan pages and also take your Analytics information one step further:</p>
<p><strong>Fans versus Non Fan activity</strong></p>
<p>An interesting way to look at your Facebook fan page activity is to split them with activity by your Fans and non fans. To do this, we need to use segments in Google Analytics to split activity into Fan and Non-Fan activity. You can create a segment based on pages visited by your user or specific event.</p>
<div id="attachment_721" class="wp-caption alignnone" style="width: 652px"><img class="size-full wp-image-721  " title="fans-vs-non-fans2" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/03/fans-vs-non-fans2.png" alt="fans-vs-non-fans2" width="642" height="176" /><p class="wp-caption-text">Using segments to track Fan/Non Fan activity</p></div>
<p>We will need to use FBJS (Facebook Javascript) and the tag &lt;fb:visible-to-connection&gt;. The tag will allow us to display a section to Fans and another to Non-Fans. We have managed to use this to create a single action button but calling different FBJS functions depending on whether the user is a fan of the page or not. Once a Javascript function is activated, the appropriate tracking image has to be shown to log the visit correctly on Google Analytics. Displaying this tracking image causes a hit to be registered on Google Analytics and this can be used to segment traffic. Visit our <a href="http://www.facebook.com/webdigi?v=app_11007063052">tracking page to get the code and see this in action</a>.</p>
<p><strong>Tracking activity on forms and on your pages</strong></p>
<p>This is a good method to track user engagement with the Facebook page. Several users might visit your Facebook page but only a few might actually engage with the form. When your custom Facebook fan page loads, Facebook does not activate the Javascript you have written. This is only activated when a user performs an activity. Something like clicking on a button, clicking of your form, playing a video, entering some details onto the form, clicking on a button of your <a href="http://www.facebook.com/webdigi?v=app_4949752878">carousel</a>, etc. This is a good opportunity to track activity on your page. All you have to do is use a script tag like the one used in the <a href="http://www.facebook.com/webdigi?v=app_11007063052">Advanced tracking page</a>.</p>
<p><strong>Goal and Funnel Visualisation</strong></p>
<p>This can be a quite powerful tool, you can track for example how many users visit your contact page, how many then proceed to engage with the page and how many eventually click on the contact button. Here is an example of a funnel visualisation.</p>
<div id="attachment_732" class="wp-caption aligncenter" style="width: 521px"><img class="size-full wp-image-732" title="funnel" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/03/funnel.png" alt="A simple funnel visualisation" width="511" height="344" /><p class="wp-caption-text">A simple two step funnel visualisation</p></div>
<p>The above two step funnel visualisation shows you how many users visited our contact page and how many proceeded to submit the form. This could have also been made into a three step funnel displaying how many visited the contact page, how many clicked around and how many actually clicked the contact button.</p>
<p><strong>Tracking Purchases or clicks on your fan page</strong></p>
<p>To track clicks which can be purchases, clicks on links, etc. We generate a tracking code for each action that we want to track using our trusted <a href="http://ga.webdigi.co.uk">Google Analytics code generator</a>. We then load this image location on click of a button, or link, etc using the usual onclick event handler.</p>
<p><strong>In conclusion</strong></p>
<p>These techniques require some knowledge of Javascript and a reasonable understanding of how the image technique lets you work around Facebook&#8217;s Javascript restriction. You can get the complete source code to how we segregate fan and non fan visits, etc <a href="http://www.facebook.com/webdigi?v=app_11007063052">here</a>. We are a <a href="http://www.webdigi.co.uk">web development company</a> and will be happy to help you out with your unique tracking needs on your Facebook page. Please share your thoughts, comments and ideas on how to track user behaviour in more depth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2010/tracking-user-engagement-on-facebook-fan-pages/feed/</wfw:commentRss>
		<slash:comments>34</slash:comments>
		</item>
		<item>
		<title>Google Analytics for Facebook Fan Pages</title>
		<link>http://www.webdigi.co.uk/blog/2010/google-analytics-for-facebook-fan-pages/</link>
		<comments>http://www.webdigi.co.uk/blog/2010/google-analytics-for-facebook-fan-pages/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 17:25:08 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[PHP Development]]></category>
		<category><![CDATA[Project Management]]></category>
		<category><![CDATA[Facebook Pages]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=639</guid>
		<description><![CDATA[We launched our Facebook fan page earlier this month and as with all Facebook pages only Facebook Insights program is available to page administrators. Facebook Insights shows demographic details and interactions on your pages BUT limited to show information of fans only. It is far less sophisticated and comprehensive when compared to the free Google Analytics. One of [...]]]></description>
			<content:encoded><![CDATA[<p>We launched our Facebook <a href="http://facebook.com/webdigi">fan page</a> earlier this month and as with all Facebook pages only Facebook Insights program is available to page administrators. Facebook Insights shows demographic details and interactions on your pages BUT limited to show information of fans only. It is far less sophisticated and comprehensive when compared to the free Google Analytics. One of the limitations of Facebook Fan pages is that you can only run limited Javascript on it and Google Analytics needs Javascript code included to correctly track visitors. We have successfully managed to get ALL functions of Google Analytics working on our Facebook fan page (including visitor statistics, traffic sources, visitor country, keyword searches with all other powerful reporting &amp; maps overlays etc).</p>
<div id="attachment_640" class="wp-caption aligncenter" style="width: 285px"><img class="size-medium wp-image-640  " title="analytics-example" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/02/analytics-example-275x300.jpg" alt="Google Analytics Example" width="275" height="300" /><p class="wp-caption-text">Google Analytics Example</p></div>
<p style="text-align: center;"><strong> </strong></p>
<p style="text-align: center;"><strong> </strong></p>
<p style="text-align: center;"><strong> </strong></p>
<p><strong>How to setup Google Analytics on your Facebook fan pages</strong></p>
<p>The workaround we use in our code is to include Google Analytics as an image instead of setting the standard Javascript. This method tracks every visitor to the custom facebook pages on Google Analytics. It required a combination of server side cookie management and an additional &lt;img&gt; tag to the bottom of the facebook fan page. Here are the steps to get Google Analytics working on your facebook fan page.</p>
<p>1) Setup Google Analytics account. If you already have one, create a new website profile. You can name it facebook.com or facebook.com/your_page_name. You will finally get your tracking code which looks like this UA-3123123-2<br />
2) Create your custom img tag for <strong>each </strong>of your pages you like to track. EG: contact form, services, products etc. You can use our tool to create the <a href="http://ga.webdigi.co.uk">Google Analytics link generator for Facebook pages</a>.<br />
3) Add the entire custom image html tag from step 2 to the bottom of each Facebook fan page that you need to track.<br />
<strong> </strong></p>
<p>That is all there is to it! Google Analytics is not real-time, so you will need to give it some time. Approximately a day before you see the fruits of your &#8220;hard&#8221; work.</p>
<p><strong>For advanced users</strong></p>
<p>Use this method, if you don&#8217;t want to use our hosted link redirection as mentioned in the method above. You can download the entire source code which is just about three files to get this setup working on your own server (running PHP4.3 or above). The code is written in PHP and essentially creates the Google image tracking URL with the referrer, page information, ID, etc. The additional advantage of hosting this on your own server and domain is that visits from your website to your facebook fan page gets tracked, etc. You will also be able to customise further if you wish. Please do share any useful updates you apply to the tracking link code.</p>
<p><a href="http://www.webdigi.co.uk/blog/apps/fbgat-facebook-google-analytics-tracker/">Facebook &#8211; Google Analytics Tracker v1.1</a> (Updated 21st Feb, 2010).  For advanced method &#8211; Download this code to use on your server.</p>
<p>If you don&#8217;t have a Facebook fan page yet, visit our tutorial for code and help on <a href="http://www.webdigi.co.uk/blog/2010/creating-a-custom-facebook-page/">creating customised Facebook fan pages</a>.</p>
<p>PS: We could not find any other source / blog that described how to get Google Analytics on Facebook fan pages! There is support for canvas pages and applications but nothing for StaticFBML fan pages. Hope this helps and please leave your comments below.</p>
<p>UPDATE:<br />
1) A lot of users have asked how to track visits to the wall. Yes, this can be done. Please see the comments by iphp below.<br />
2) Here is a <a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/adding-img-tag.png">screenshot to a staticFBML</a> where the code should be placed<br />
3) We have managed to <a href="http://www.webdigi.co.uk/blog/2010/tracking-user-engagement-on-facebook-fan-pages/">set up funnels, goals and segments to separate fan and non fan activity</a>.<br />
4) <strong>Video:</strong> Here is a link to the <a title="Webdigi UK on Youtube" href="http://www.youtube.com/UKwebdigi">Webdigi youtube channel</a> check our favourites to get step by step walkthrough!<br />
5) This blog and comments cover all aspects of setting up Google Analytics. If you still want help, we are available to offer paid support and installation of Analytics for your page. Please <a href="http://www.webdigi.co.uk/contact">contact us here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2010/google-analytics-for-facebook-fan-pages/feed/</wfw:commentRss>
		<slash:comments>401</slash:comments>
		</item>
		<item>
		<title>Creating a custom facebook fan page</title>
		<link>http://www.webdigi.co.uk/blog/2010/creating-a-custom-facebook-page/</link>
		<comments>http://www.webdigi.co.uk/blog/2010/creating-a-custom-facebook-page/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 13:16:38 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Javascript Development]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Facebook Pages]]></category>
		<category><![CDATA[FBJS]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=553</guid>
		<description><![CDATA[A Facebook Page is a public Profile that enables information about business and products to be shared with Facebook users and the public. An user should be able to create one in a few minutes. This article explains how to add custom tabs to your Facebook page to make it do more. Here we explain [...]]]></description>
			<content:encoded><![CDATA[<p>A Facebook Page is a public Profile that enables information about business and products to be shared with Facebook users and the public. An user should be able to create one in a few minutes. This article explains how to add custom tabs to your Facebook page to make it do more. Here we explain how we built a carousel, navigation tabs, forms, etc on the <a title="Webdigi Facebook fan page" href="http://www.facebook.com/pages/London-United-Kingdom/Webdigi-Web-Development/257801797036">Webdigi Facebook fan page</a>.</p>
<div id="attachment_559" class="wp-caption aligncenter" style="width: 489px"><a href="http://www.facebook.com/pages/Nutella/24932281961"><img class="size-full wp-image-559   " title="nutella" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/01/nutella.png" alt="Nutella Facebook fan page" width="479" height="370" /></a><p class="wp-caption-text">Nutella Facebook fan page</p></div>
<p><strong>What do you need to create custom Facebook fan pages?</strong></p>
<p>The only thing you need is <a href="http://www.facebook.com/apps/application.php?id=4949752878">Static FBML</a> created by Facebook, this is an application that you have to add to your page. You can add advanced functionality to your fan page using the Facebook Static FBML application. This application will add a tab to your Page in which you can render HTML or FBML (Facebook Markup Language) for enhanced Page customisation. You will be able to add more than one tab using this application. On our Facebook fan page, we have three pages created using this application: services, portfolio and contact.</p>
<p><strong>What are the restrictions on Facebook ?</strong></p>
<p>1) Facebook does not allow<strong> Javascript to run on load</strong>, an user action like a mouse click must be performed before Javascript can be run. You will notice this on the services tab of our Facebook fan page. The carousel mouse over works only after you click on one of the arrows.</p>
<p>2) You will need to use <strong>FBJS (Facebook Javascript)</strong>. This provides the functionality we need to develop custom facebook pages. This is also to protect other users privacy at the same time and restrict Javascript features that can be abused.</p>
<p>3) Use &lt;link href=&#8221;http://example.com/style.css&#8221; rel=&#8221;stylesheet&#8221; type=&#8221;text/css&#8221; /&gt; if you want to use CSS on your Facebook fan page. This is to get the page to work correctly on Internet Explorer. The other browsers support the &lt;style type=&#8221;text/css&#8221;&gt; tag.</p>
<p>4) AJAX requests have a short timeout and these requests are proxied via Facebook. There are also limits on length of JSON replies, etc.</p>
<p><strong>Creating tabs on the Facebook fan page using FBML and FBJS</strong></p>
<p><a href="http://wiki.developers.facebook.com/index.php/FBJS">FBJS </a>is Facebook&#8217;s solution for developers who want to use JavaScript in their Facebook applications. FBJS DOM objects implement most of the same methods regular JavaScript objects implement including: appendChild, insertBefore, removeChild, and cloneNode. Properties like parentNode, nextSibling, src, href (and many many others) have been redefined as a couplet of getters and setters (getStyle : setStyle, getValue : setValue, getClassName : setClassName). Here is an example of a tab on a Facebook page.</p>
<p style="text-align: center;"><a href="http://www.facebook.com/pages/London-United-Kingdom/Webdigi-Web-Development/257801797036?v=app_7146470109"><img class="aligncenter size-full wp-image-571" title="apptabs" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/01/apptabs.png" alt="apptabs" width="732" height="157" /></a></p>
<p><strong>Creating a carousel on the fan page</strong></p>
<p>FBJS exposes a powerful<a href="http://wiki.developers.facebook.com/index.php/FBJS/Animation"> animation library</a> which gives developers an easy way to improve their user interface with a line of code or two. All animations are CSS based, so a working knowledge of CSS will really help you out here. One of Facebook&#8217;s security restrictions are that Javascript will not be allowed onload of the page. The user must perform an action like clicking on a button, etc to begin Javascript code execution. This would mean that automated carousels; a carousel that starts rolling images by itself cannot be built into a Facebook fan page. This restriction also applies to pages with video, etc.</p>
<p style="text-align: center;"><a href="http://www.facebook.com/pages/London-United-Kingdom/Webdigi-Web-Development/257801797036?v=app_4949752878"><img class="aligncenter size-full wp-image-576" title="portfolio" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/01/portfolio.png" alt="portfolio" width="708" height="230" /></a></p>
<p><strong>Submitting a web form using AJAX</strong></p>
<p>Creating a form for a fan page can be done using HTML. The AJAX support from facebook is interesting. All AJAX requests to the server you have under your control goes through facebook. If you have a tool monitoring the AJAX request, you will see that the form is actually being sent through to fbjs_ajax_proxy.php which in turn POST or GET the request to your server. The AJAX request can be sent using FBML in 3 steps:</p>
<pre class="brush: jscript; title: ; notranslate">
var ajax = new Ajax();
ajax.responseType = Ajax.FBML;
ajax.post('http://example.com/ajax.php');
</pre>
<p><strong>Creating Dialog boxes on Facebook</strong></p>
<p style="text-align: center;"><a href="http://www.facebook.com/pages/London-United-Kingdom/Webdigi-Web-Development/257801797036?v=app_6009294086"><img class="aligncenter size-full wp-image-583" title="dialog" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2010/01/dialog.png" alt="dialog" width="592" height="223" /></a></p>
<p>FBJS offers a variety of Dialog boxes: Confirmation boxes, Yes/No type, Dialog boxes with forms, Choice, etc. To create the above dialog, we just need the following one line of code</p>
<pre class="brush: jscript; title: ; notranslate">
new Dialog().showMessage('Confirmation', 'The contact form has been submitted.');
</pre>
<p><strong>Show me the code</strong></p>
<p>Here are all the three code files that are in use for each of the three tabs on Facebook.</p>
<p>Contact Us tab (Containing form, AJAX submit and Dialog boxes) <a href="http://www.webdigi.co.uk/apps/fbapp/contactus.fbml">code</a></p>
<p>Portfolio tab (Carousel using FBJS Animation features) <a href="http://www.webdigi.co.uk/apps/fbapp/portfolio.fbml">code</a></p>
<div>
<p>Services tab (Tabs within page, basic FBJS events) <a href="http://www.webdigi.co.uk/apps/fbapp/services.fbml">code</a></p>
<div>We hope this helps you cut short your search and gives you a head start in your quest to build custom tabs within Facebook pages. There are numerous resources out there that helped us understand FBJS and build this article. Do send us links to fan pages that you have built, looking forward to your comments.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2010/creating-a-custom-facebook-page/feed/</wfw:commentRss>
		<slash:comments>178</slash:comments>
		</item>
		<item>
		<title>Stupidity versus Malice</title>
		<link>http://www.webdigi.co.uk/blog/2009/stupidity-versus-malice/</link>
		<comments>http://www.webdigi.co.uk/blog/2009/stupidity-versus-malice/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 16:25:55 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Disaster]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=531</guid>
		<description><![CDATA[As a web developer, I am required to build web applications and secure websites. One of the key requirement is to create a secure and well protected system to keep attackers at bay. Although securing the website from malice is important, it is also important to secure the web application from stupidity. Stupidity from the [...]]]></description>
			<content:encoded><![CDATA[<p>As a web developer, I am required to build web applications and secure websites. One of the key requirement is to create a secure and well protected system to keep attackers at bay. Although securing the website from malice is important, it is also important to secure the web application from stupidity. Stupidity from the privileged users, administrators, developers, etc. The cost of stupidity is often underestimated. By stupidity I mean lack of average intelligence assumed for a particular task or not thinking through atleast a few worst case scenarios prior to doing something.</p>
<p>Let me give you a few <strong>big</strong> examples from history and recent times.</p>
<p><strong>1) Data worth 2 billion dollars lost in courier</strong><br />
In 2007, 25 million child benefit records was sent from one government department to another and was lost by the courier company. The discs were sent by a junior staff member <strong>unencrypted and unregistered</strong>. The discs contained all kinds of personal data, names and ages of children, bank savings account numbers, partners details and even National Insurance Numbers (Equivalent to the Social Security Numbers).  The costs that this caused UK is not clear but it did involve high profile resignations, weeks and weeks of political debates, banks monitoring millions of accounts for fraudulent activity, etc. Some estimate the data alone could be worth over <a href="http://news.bbc.co.uk/1/hi/uk_politics/7117291.stm">$2 billion</a> in criminal hands.</p>
<p><strong>2) The Honda Point Disaster (Off California Coast)</strong></p>
<div id="attachment_533" class="wp-caption alignleft" style="width: 310px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/09/honda_point.gif"><img class="size-medium wp-image-533" title="honda_point" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/09/honda_point-300x237.gif" alt="Aerial view showing all seven destroyers" width="300" height="237" /></a><p class="wp-caption-text">Aerial view showing all seven destroyers</p></div>
<p>This was the largest peacetime loss of U.S. Navy ships in which <strong>seven destroyers were lost</strong>. This tragedy was not caused by malice. Twenty-three sailors died in the mishap. Two other destroyers were slightly damaged. The navy court ruled it as a fault of the navigators and the captains of each ship. <strong>How did this happen? </strong>The flagship was equipped with a radio navigational receiver, but ignored the bearings, believing them to be erroneous. No effort was made to take soundings or depth measurements. These operations were not performed due to the <strong>need to slow the ships to take readings</strong>. The ships were performing an exercise that simulated wartime conditions, hence the decision not to slow down. In this case, the dead reckoning (method of estimating position) was wrong and the mistake fatal. The need to slow the ship might also reminds us of another disaster, the Titanic!</p>
<p><strong>3) Aviation Accidents<br />
<span style="font-weight: normal;"><a href="http://www.boeing.com/news/techissues/pdf/statsum.pdf">Boeing studied</a> commercial jet accidents (not including hijacking, test flights, etc) between 1959 to 2008. They determined the primary cause of Airline hull loss accidents (aircraft beyond repair) to be the following:<br />
</span></strong></p>
<li><strong>55%: Flight crew error</strong></li>
<li>17%: Airplane</li>
<li>13%: Weather</li>
<li>7%: Misc./Other</li>
<li><strong>5%: Air traffic control</strong></li>
<li>3%: Maintenance</li>
<p><strong><span> </span> </strong></p>
<p>Clearly a lot of these are preventable and a lot of lives could have been saved. Flight crew error and the Air traffic control accounts to about 60% of all hull loss accidents.</p>
<p><strong>In Conclusion<br />
</strong>Accidents do and will happen, I would recommend developers to think about stupidity and not just malice when building systems. I have two interesting quotes to leave you with.<br />
Albert Einstein - <em>Two things are infinite: the universe and human stupidity; and I&#8217;m not sure about the universe.</em><br />
Hanlon&#8217;s Razor<strong> </strong>- <em>Never attribute to malice that which can be adequately explained by stupidity.</em></p>
<p>Do share incidents that you have come across during your career.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2009/stupidity-versus-malice/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to get your side project launched</title>
		<link>http://www.webdigi.co.uk/blog/2009/how-to-get-your-side-project-launched/</link>
		<comments>http://www.webdigi.co.uk/blog/2009/how-to-get-your-side-project-launched/#comments</comments>
		<pubDate>Sun, 23 Aug 2009 12:30:22 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[Development Technology]]></category>
		<category><![CDATA[Project Management]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=522</guid>
		<description><![CDATA[There are many people who have a lot of interesting ideas in mind but never get around to starting on their side/pet project. Some people start on their side project but never get to completion. These are the three steps which if followed before you start actual work on your project will help you get [...]]]></description>
			<content:encoded><![CDATA[<p>There are many people who have a lot of interesting ideas in mind but never get around to starting on their side/pet project. Some people start on their side project but never get to completion. These are the three steps which if followed before you start actual work on your project will help you get your pet project launched.</p>
<p><strong>1. </strong><strong>Think things through</strong><br />
- This is the most important step. If you do this well, consider your side project well begun and half done!<br />
- Visualize things after completion will it make you happy? Will it make you feel like you accomplished something? Will it make you feel successful?<br />
- Humans operate with pain-pleasure principle.  Will the completion of the project alleviate your pain or others pain? Will it bring some pleasure to the work and lives of others or yourself?<br />
- When the going gets tough with your pet project as it often does, these reasons will help you and give you the strength to complete the project.</p>
<p><strong>2. Set a deadline with detailed plans</strong><br />
- Start by identifying all the steps you need to complete and each stage.<br />
- When can you reasonably finish the project?<br />
- When do you want to launch? When do you want to get your product or service out to the public?<br />
- Make detailed and specific plans, not vague ones.<br />
- Also the most important rule, remember nothing is perfect. You will have to refine after launch and constantly learn from it. Take a look at the first version of <a href="http://web.archive.org/web/19981111183552/google.stanford.edu/">Google</a>. Your first launch is the beginning get ready to quickly make changes depending on user feedback.</p>
<p><strong>3. Make commitments</strong><br />
- Tell your friends and your family you are going to launch on the deadline.<br />
- If you had prospective customers enquiring about product, let them know that you are launching the product or service on the launch date.<br />
- Schedule banner ads, ppc ads, book presentations, print leaflets, etc as required to promote your project and get you to focus on the launch.<br />
- Get a mailing list of all people who you know that will be interested in the project.<br />
- The third point in my opinion is the one most often ignored and causes deadlines to slip. If  your family &amp; friends know that we are busy working on something they might understand not to bother you until your launch date!</p>
<p>The first point on thinking things through will energize you or show you that this project should never be done. The third point will commit you to the deadline and hopefully clear out distractions as your family and friends are now aware of what you are working on. Only once all the three steps above are complete you should start working on your project and in accordance with your plan.</p>
<p>If you are working on your pet project please do share your experience!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2009/how-to-get-your-side-project-launched/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Get your own cloud server running in 15 minutes</title>
		<link>http://www.webdigi.co.uk/blog/2009/get_your_own_cloud_server_running_in_15_minutes/</link>
		<comments>http://www.webdigi.co.uk/blog/2009/get_your_own_cloud_server_running_in_15_minutes/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 08:17:57 +0000</pubDate>
		<dc:creator>iphp</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Amazon EC2]]></category>
		<category><![CDATA[AWS Management Console]]></category>
		<category><![CDATA[Cloud Computing]]></category>

		<guid isPermaLink="false">http://www.webdigi.co.uk/blog/?p=486</guid>
		<description><![CDATA[This article uses Amazon EC2 and does not require any additional software installed on your machine to get your own cloud instance running other than your browser. To further configure your instance once it is running you will need Putty or an RDP client depending on your server instance. Amazon EC2 (Elastic Compute Cloud) is [...]]]></description>
			<content:encoded><![CDATA[<p>This article uses Amazon EC2 and does not require any additional software installed on your machine to get your own cloud instance running other than your <strong>browser</strong>. To further configure your instance once it is running you will need Putty or an RDP client depending on your server instance.</p>
<p>Amazon EC2 (Elastic Compute Cloud) is a service by Amazon which lets anyone create, launch, and terminate server instances as needed, paying by the hour for active servers, hence the term &#8220;elastic&#8221;. The service starts as low as 0.11$ per hour. For this article an instance of LAMP server and a Windows Server 2003 was launched and cost about $<strong>0.25. </strong>This is very cheap for your on-demand server needs.</p>
<p><strong>Steps to Launch your server instance</strong></p>
<p>1) Signup for <a href="http://aws.amazon.com/ec2/">Amazon EC2 here</a> (If you already have an amazon account you can save 2 minutes!)<br />
2) Login to the <a href="https://console.aws.amazon.com/ec2/home#c=EC2&amp;s=Home">EC2 management console<br />
</a></p>
<div id="attachment_487" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/management-console.png"><img class="size-medium wp-image-487  " title="ec2_management-console" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/management-console-300x157.png" alt="AWS Management Console" width="300" height="157" /></a><p class="wp-caption-text">AWS Management Console (Click to enlarge)</p></div>
<p>3) On the management console, Click on <strong>Launch Instances</strong><br />
4) <strong>Select an AMI</strong> (Amazon Machine Image). You will get a huge list ranging from windows servers to LAMP servers, Ruby on Rails server, Ubuntu, Debian, Open Solaris etc. If you also look at the community supplied options you will have nearly 3000 AMIs.</p>
<div id="attachment_490" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/ami-list.png"><img class="size-medium wp-image-490" title="List of Amazon Machine Images" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/ami-list-300x180.png" alt="List of Amazon Machine Images" width="300" height="180" /></a><p class="wp-caption-text">List of Amazon Machine Images</p></div>
<p>5) <strong>Create a key pair</strong> by following on screen instructions. This is to help you to login to your AMI once it is ready.<br />
7) Configure <strong>firewall settings</strong> and limit access to the server (SSH, MySQL, Web, etc).</p>
<div id="attachment_492" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/configure-firewall.png"><img class="size-medium wp-image-492" title="configure-firewall" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/configure-firewall-300x179.png" alt="Authorise connection method" width="300" height="179" /></a><p class="wp-caption-text">Authorise connection method</p></div>
<p>8 ) You will now arrive at the<strong> final step</strong> of your wizard. Enter number of instances. Select an instance type Small, High CPU, etc. You will also have to select the key pair that was generated for you at Step 5. Click Launch once set.</p>
<div id="attachment_493" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/launch-instance.png"><img class="size-medium wp-image-493" title="launch-instance" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/launch-instance-300x169.png" alt="Set Number of Instances" width="300" height="169" /></a><p class="wp-caption-text">Set Number of Instances</p></div>
<p>9) <strong>Voila!</strong> your instance will be available in just a few minutes. Now you can pat yourselves on the back for all the hard work!</p>
<p>It is amazing how quickly you can get an instance running. Once your server is up and running how do you connect to this instance? Well, it is pretty simple if you are using windows you get to use RDP (Terminal Services). For non-windows instances you will have to use SSH to connect to the server.</p>
<p><strong>Advanced configuration of your Windows instance using RDP (optional)</strong><strong></strong></p>
<p>It is easy to connect to a windows amazon instance via RDP compared to SSH connection to a linux server. To retrieve the RDP password, you will have to right click your instance and retrieve connection information using the key pair you have been given.</p>
<div id="attachment_496" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/rdp-connection.png"><img class="size-medium wp-image-496" title="rdp-connection" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/rdp-connection-300x170.png" alt="Connecting via RDP " width="300" height="170" /></a><p class="wp-caption-text">Connecting via RDP </p></div>
<p>You will have to connect using Administrator as your username. You will find all other info you need on the management console.</p>
<p><strong>Advanced configuration of your Linux instance using SSH (optional)</strong></p>
<p>You will need putty to connect to your linux server via SSH on a windows machine. If you are on a linux machine you will be able to use the ssh command as shown on the management console. With putty you will also need an additional tool to create a PPK file from the PEM file that you are given from the management console. To do this you will have to download an additional tool called PuttyGen.exe. You have to load the PPK file under the SSH Auth section of the putty client.</p>
<div id="attachment_495" class="wp-caption aligncenter" style="width: 310px"><a href="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/ssh-connect.png"><img class="size-medium wp-image-495" title="Using SSH to connect" src="http://www.webdigi.co.uk/blog/wp-content/uploads/2009/06/ssh-connect-300x244.png" alt="SSH Connection to your instance" width="300" height="244" /></a><p class="wp-caption-text">SSH Connection to your instance</p></div>
<p>Once your instance is up and running you will be able to connect to the webserver, connect to the MySQL server, if it is enabled with the AMI. The last two sections are to help you further configure your instance further. There are so many AMIs available with a lot of features already built in. Technically you will have your services running after the first set of steps which can be complete in 15 minutes!</p>
<p>If you do not want to configure a server yourself take a look at the Windows Azure, Force.com or the Google App Engine which runs Java, Python and <a href="http://www.webdigi.co.uk/blog/2009/run-php-on-the-google-app-engine/">PHP using Quercus</a> for free (certain usage limits apply).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webdigi.co.uk/blog/2009/get_your_own_cloud_server_running_in_15_minutes/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

