Archive

Posts Tagged ‘PHP’

Colour Gradient PHP Class

February 26th, 2007 hamish 13 comments

I wrote this class to handle smooth gradients of colour and other data types. Specifically I wanted a robusts way to handle fonts size and colour for tag-cloud object that I’m working on at the moment. Although the task wasn’t very complicated I am quite pleased with my solution because it is so easy to use and transparent.

Example 1: Simple Gradient

Gradient Example 1 Read more…

Categories: Programming Tags: ,

Apache Log Parser Class

February 5th, 2007 hamish 7 comments

The following is a PHP class that will parse Apache webserver access logs and return each lines component values in an associative array (hash). It’s ported from a CPAN module but I’ve made my own improvements.

View Source http://kungf.eu/wp-content/uploads/apachelogregex.class.phps
Download: http://kungf.eu/wp-content/uploads/apachelogregex.zip Read more…

Categories: Programming Tags: , ,

Referer – Wordpress Plugin

November 8th, 2006 hamish 30 comments

Warning: This plug-in is now unsupported. I haven’t had time to develop it for a while, and I can’t see that changing any time soon. If anybody wishes to do something with this then by all means be my guest.

Description »

Referer [sic] is a plugin for the popular blogging software WordPress. It allows you to display information about refers you have had from other websites. Currently available stats are Top URLs, Top Hosts Top Search Keywords, and Top Search Phrases. Basically these show how many people have clicked through from a given website and what people are searching for to find your website.

You can see this plugin in action at the bottom of my right-hand sidebar (see http://kitty0.org/blog/).

I know it’s spelt wrong but somehow that is the spelling used in the HTTP/1.1 Specification (RFC 2616) so I guess it is now the official spelling when describing “the address (URI) of the resource from which the Request-URI was obtained.”

Read more…

Referer Plugin version 0.40

August 31st, 2006 hamish No comments

I had some time off work which gave me the opportunity to get another version of the plugin out the door. Learn more abou it in the Referer Plugin section.

  • Added Manage options subpage which allows you to view and manipulate stored referer records.
  • Moved Log upload controls and other operations to Tools options subpage.
  • Simplified default display templates, because they where confusing and where causing problems with IE (surprise-surprise.)
  • Improved Apache Log Upload functionality so you can now set any valid CustomLog directive for parsing.
  • More…
Categories: Programming Tags: , , ,

Referer Plugin version 0.30 released!

August 6th, 2006 hamish No comments

Finally got round to finishing version 0.30 of Referer Wordpress plugin. I’ve been working on it for a while, changes include:

  • Added support for compressed log uploades in gzip format.
  • Added ability to process a log file already on the server.
  • Improved support for multilinqual characters in referer urls.
  • Improved options page layout.
  • Countless bug fixes.
  • more…
Categories: Programming Tags: , , ,

Referers [sic]

April 13th, 2006 hamish No comments

Yes I know it’s spelled wrong but somehow that is the spelling used in the HTTP/1.1 Specification (RFC 2616) so I guess it is now the official spelling when describing “the address (URI) of the resource from which the Request-URI was obtained.”

I have made a plugin for WordPress that processes and stores these referers and can display a list of top refering hosts and also top search words. Basically this allows me to see: Firstly how many people are clicking on links to my website and from which website. Secondly what words people are using in popular search engines to find my site.

Edit: A new version has been released and the rest of this post has been moved here: http://kungf.eu/archived/referer-wordpress-plugin

Categories: Programming Tags: ,