<?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>sam-hughes.co.uk &#187; Websites</title>
	<atom:link href="http://www.sam-hughes.co.uk/category/Websites/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sam-hughes.co.uk</link>
	<description>Etw aka Ntw's Blog :: "Life ain't that simple"</description>
	<lastBuildDate>Wed, 14 Dec 2011 19:44:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Open Flash Charts</title>
		<link>http://www.sam-hughes.co.uk/2009/08/16/open-flash-charts/</link>
		<comments>http://www.sam-hughes.co.uk/2009/08/16/open-flash-charts/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 14:15:59 +0000</pubDate>
		<dc:creator>Sam Hughes</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[OFC]]></category>
		<category><![CDATA[OFC2]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[recommended]]></category>

		<guid isPermaLink="false">http://www.sam-hughes.co.uk/?p=65</guid>
		<description><![CDATA[I Thought I should try and give Open Flash Charts (OFC2) some publicity given how much I&#8217;m making use of this brilliant bit of software. I&#8217;m not going to cover what it can or can&#8217;t do as the OFC2 website does that already, but instead will cover why you should consider OFC for any charting [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_68" class="wp-caption aligncenter" style="width: 250px"><img class="size-medium wp-image-68" title="logo-2" src="http://www.sam-hughes.co.uk/wp-content/uploads/2009/08/logo-2-300x79.png" alt="Open Flash Chart Logo" width="240" height="63" /><p class="wp-caption-text">Open Flash Chart Logo</p></div>
<p>I Thought I should try and give <a href="http://teethgrinder.co.uk/open-flash-chart-2/">Open Flash Charts (OFC2)</a> some publicity given how much I&#8217;m making use of this brilliant bit of software.  I&#8217;m not going to cover what it can or can&#8217;t do as the OFC2 website does that already, but instead will cover why you should consider OFC for any charting needs.</p>
<p>OFC2 is a free, and open source, system for creating charts in Flash.  It also comes with a <a href="http://teethgrinder.co.uk/open-flash-chart-2/tutorial-other-libraries.php">collection of libraries</a> to generate the charts using, PHP, Perl, Ruby, .NET, ColdFusion, and Javascript.</p>
<p>OFC2 supports a wide range of charts, and is constantly being improved my its creator, monk.e.boy and a few other dedicated contributors, recently adding animations which are always useful to please &#8216;PowerPoint&#8217; obsessed end-users.</p>
<p>Why should you use OFC2 for webcharts? Well firstly its free, secondly its almost as good as any professional package I&#8217;ve found out there, and thirdly the small but active community on the OFC forums will try and help you with any issues you&#8217;ve found, as well as giving tips and often posting sample code they think could be useful to others.</p>
<p>I work for a very large international company in the financial services sector, and for various reasons some IT teams in the company are using amCharts for their graphing, and works very well for their needs.  But for the work I&#8217;m doing we&#8217;ve gone with OFC2 as its far more flexible, no licensing/cost involved so no purchasing bureaucracy to deal with, and also personally I like to try to use and support open source projects where I can.  Also by being free you can play with it as much as you need first to see if it meets your needs, no time limited or limited functionality demos.</p>
<p>The charts we use OFC for are used in reports for senior management, for daily visibility of our environment and also for other teams to view data about their usage of our environment and reduce the support burden on us.  One key feature of OFC2 for us, is that we have the interactiveness of the flash chart but at the same time can easily save a chart as an image to embed in a document/report.</p>
<p>I&#8217;ve now been using OFC2 at work for well over nine months and recently implemented an extra abstraction layer between my data and OFC.  This allows me to create a custom array structure for all my charts, and then use a set of predefined custom functions alongside the OFC2 api to turn this into JSON.  This means I can very quickly adjust the code for any API changes, in one single file and makes it a lot harder to break charts while creating/updating the style of others.</p>
<p>One of OFC2&#8242;s greatest strengths is that it is constantly being improved, however this does cause a few problems for it, with slight changes to APIs and documentation lag caused partly by this.  However on balance the pros far outweigh the cons, as it allows the software to evolve and develop in a way that is best for it and us users, without having to work changes around a fixed data structure or API unlike most commercial products.  This means that messy/confusing data structures are able to be reduced to a n absolute minimum.</p>
<p><span style="text-decoration: underline;">Pros<br />
</span></p>
<ul>
<li>New releases are made often with bug fixes/new features</li>
<li>Free</li>
<li>Flexible</li>
<li>Friendly community support such as <a href="http://ofc2dz.com/">DZ&#8217;s branches/patches</a></li>
<li>A developer that&#8217;s willing to listen to suggestions and requests</li>
<li>Professional output</li>
<li>Open source, so you can change it as much you want</li>
</ul>
<p><span style="text-decoration: underline;">Cons</span></p>
<ul>
<li>API can change with each new release</li>
<li>Small development team so can take a while for some things to get done</li>
<li>Seems to have a few memory leaks (more noticeable in IE than FF)</li>
<li>Documentation/examples can be a bit sparse in some areas and slightly out of sync with realeases for short periods</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sam-hughes.co.uk/2009/08/16/open-flash-charts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Drupal Modules</title>
		<link>http://www.sam-hughes.co.uk/2008/12/12/drupal-modules/</link>
		<comments>http://www.sam-hughes.co.uk/2008/12/12/drupal-modules/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 20:39:00 +0000</pubDate>
		<dc:creator>Sam Hughes</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[LSUCS]]></category>
		<category><![CDATA[Planet LSUCS]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.sam-hughes.co.uk/?p=17</guid>
		<description><![CDATA[I thought I might as well &#8216;publish&#8217; two Drupal modules that I&#8217;ve been working on. Account Reactivation (Drupal 5) This was created for LSU CompSoc&#8217;s new site, to enable members to request that their account is re-activated at the start of the new year, once they have signed up again. Download the module here: Timetable [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I might as well &#8216;publish&#8217; two Drupal modules that I&#8217;ve been working on.</p>
<p><strong>Account Reactivation</strong> (Drupal 5)<strong><br />
</strong>This was created for <a href="http://www.lsucs.org.uk">LSU CompSoc&#8217;s</a> new site, to enable members to request that their account is re-activated at the start of the new year, once they have signed up again.</p>
<p>Download the module here: <code><a class="downloadlink" href="http://www.sam-hughes.co.uk/wp-content/plugins/download-monitor/download.php?id=2" title="Version v1.0 downloaded 532 times" >Drupal Account Reactivation Module</a></code></p>
<p><strong>Timetable</strong> (Drupal 6)<strong><br />
</strong>This is a basic module I created as a test module to get back into Drupal development.  It creates a timetable, with the ability to add and remove items via a form, and to set the slots available during the day on the timetable.</p>
<p>Download the module here: <code><a class="downloadlink" href="http://www.sam-hughes.co.uk/wp-content/plugins/download-monitor/download.php?id=3" title="Version v1.0 downloaded 641 times" >Drupal Timetable Module</a></code></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><em>Please note that both these modules are provided &#8216;as is&#8217; and may not be completely stable/include bugs .  Do not use on a production site without first testing thoroughly.</em></p>
<p><em>However I will provide help/improvements/fixes if time allows for the modules.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sam-hughes.co.uk/2008/12/12/drupal-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Website Access Restrictions</title>
		<link>http://www.sam-hughes.co.uk/2008/04/28/website-access-restrictions/</link>
		<comments>http://www.sam-hughes.co.uk/2008/04/28/website-access-restrictions/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 18:09:24 +0000</pubDate>
		<dc:creator>Sam Hughes</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Planet LSUCS]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.sam-hughes.co.uk/2008/04/28/website-access-restrictions/</guid>
		<description><![CDATA[I manage/admin a fair few sites covering an oil exploration equipment company to a church website. Unfortunately over time I&#8217;ve had a some issues with spammers posting random unwanted guestbook messages and so on. Therefore I decided to go ahead and implement some measures to start blocking them. The main site this occurs on is [...]]]></description>
			<content:encoded><![CDATA[<p>I manage/admin a fair few sites covering an oil exploration equipment company to a church website.   Unfortunately over time I&#8217;ve had a some issues with spammers posting random unwanted guestbook messages and so on.</p>
<p>Therefore I decided to go ahead and implement some measures to start blocking them.  The main site this occurs on is the church site I run, which has an option to blacklist IP addresses.  However as the spam comes from a range of IP addresses each time the site is &#8216;hit&#8217; this would involve a tedious process of adding each address.</p>
<p>Therefore I decided to use the .htaccess allow/deny restrictions.  While these are simple to use, getting the information required isn&#8217;t  always as easy.</p>
<p>The method I took used three steps:</p>
<ol>
<li>Determining the IP Range involved</li>
<li>Calculating the network prefix of the range</li>
<li>Banning them</li>
</ol>
<p>For the first step I noticed the IP addresses each time I was hit were similar,  so I looked them up on <a href="http://software77.net/geo-ip/" target="_blank">http://software77.net/cgi-bin/ip-country/geo-ip.pl</a> to see if they were in a single range assigned to a particular organisation or country.  In this case they were.</p>
<p><span style="text-decoration: line-through;">Then I converted the range from a start and end IP address to a single address with a prefix.  In my case it was 123.112.0.0/12. (you can check your conversion using <a href="http://www.csgnetwork.com/ipinfocalc.html" target="_blank">http://www.csgnetwork.com/ipinfocalc.html</a>) </span>[The look-up link above now gives you the CIDR range]</p>
<p>Finally I added the following lines to my .htaccess file, including a comment for future reference</p>
<blockquote><p><em>Order Allow,Deny<br />
##Chinese IP range banned for guestbook spam 28/4/08<br />
Deny from 123.112.0.0/12<br />
Allow from all</em></p></blockquote>
<p>As a side note banned users will get a HTTP 403 error page.  I also created a custom page to be loaded for banned users, defined  by the following line in my .htaccess file:</p>
<blockquote><p><em>ErrorDocument 403 /errordocs/403.html</em></p></blockquote>
<p>You also need to test that they have access to view this page, so I added another .htaccess file in the <em>errordocs</em> folder with the following lines:</p>
<blockquote><p>order deny,allow<br />
allow from all</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.sam-hughes.co.uk/2008/04/28/website-access-restrictions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Server Monitoring Script</title>
		<link>http://www.sam-hughes.co.uk/2008/01/25/php-server-monitoring-script/</link>
		<comments>http://www.sam-hughes.co.uk/2008/01/25/php-server-monitoring-script/#comments</comments>
		<pubDate>Fri, 25 Jan 2008 21:32:31 +0000</pubDate>
		<dc:creator>Sam Hughes</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[Planet LSUCS]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.dev-site.co.uk/blog/2008/01/25/php-server-monitoring-script/</guid>
		<description><![CDATA[We&#8217;ve been having some issues with the availability of the LSUCS server recently, so I decided to try and put some monitoring in place. Unfortunately we&#8217;re not in the position to deploy a full monitoring suite with heartbeat monitoring etc. So I developed a PHP script to check the status of the server remotely. This [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been having some issues with the availability of the LSUCS server recently, so I decided to try and put some monitoring in place.  Unfortunately we&#8217;re not in the position to deploy a full monitoring suite with heartbeat monitoring etc.</p>
<p>So I developed a PHP script to check the status of the server remotely.  This is done by checking the IP address, and connections on specified ports. The script can be configured to sends status emails, and to send error emails.</p>
<p>The script also accesses data from a remote PHP script on the monitored server to access disk usage data if available.</p>
<p>The script can be downloaded from <a href="http://www.sam-hughes.co.uk/wp-content/uploads/2008/01/server_statusphp-120.gz" title="Server Status Script">here</a>.</p>
<p><strike>The script will probably be changed over time to support multiple servers and extra functionality.</strike></p>
<p>26 Jan 2008: I&#8217;ve added support for multiple servers and extra features (see code for full details).  The link above now points to the latest version.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sam-hughes.co.uk/2008/01/25/php-server-monitoring-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

