FuelTweet – A Twitter application sharing cheap fuel prices

February 5th, 2010

Introducing Fueltweet, a new Twitter application you can talk to, it’ll tell you the best Petrol or Diesel price in your area.

fueltweet_screenshot

If you want to know the cheapest spot to fill up in Bishopstown forexample, tweet “@petroltweet Bishopstown” or “@dieseltweet Bishopstown” depending on wether you are looking for Petrol or Diesel prices. It will respond to you a few seconds later with the most up to date and best price it knows in that area.

Its early days for this application so it may not know any prices in your area. It needs to be kept up to date too with current prices so keep it up to date if you can while on your travels. Heres an example of telling the application about the price of petrol in a Texaco garage in Bishopstown; “@petroltweet Texaco in Bishopstown 124.9”.

Cork Open Coffee

Like a lot of great ideas, the idea for this Twitter app came from Corks Open Coffee. John Peavoy and I chatted about the concept and agreed that it would be a useful App. I began using the Twitter API to play around with functionality and create the app. The look and feel, and the input syntax is still evolving, so please give your feedback, good or bad, on how it works.

We have a new site up and running to promote the application, to show people how to use it and to show the best and average Petrol & Diesel prices around at the moment, http://www.fueltweet.com. Its a great design from John Sheahan of Egg Design, a new regular of Cork Open Coffee.

If you have any feedback on the application, whether about the use of it or the information contained within it, please let me know. There are plenty of features coming very soon, the plan is to keep it simple and to give the user information quickly.

Pumps.ie API

Another site Pumps.ie, created by Jonathan Dean has been around for a few years with a great range of fuel pricing data and locations. Jonathan has been good enough to give us early access to their upcoming API so that we will be able to swap information between Fueltweet and Pumps.ie. Check out their free pumps.ie iPhone app too in the iTunes store.

Thank you to all the users on Twitter who have been sending in updated fuel prices so far, keep it up - this is a public service and will become stronger and more useful as you use it more and input more information. Finally, I hope you’re not Tweeting while driving - keep safe and only tweet when you’re stopped and it is safe to do so!

Find your best email marketing campaign

January 15th, 2010

The Marketing Institute, eConsultancy, Mailer Mailer and more are all great sources for email marketing reports and metrics.

There’s no substitute though for real data from a business’s own email marketing campaigns.

Campaign Monitor is a very popular and well-liked email marketing application. It’s cost effective too at 5 US Dollars per campaign + 1 Cent per recipient.

Campaign monitor have an API, meaning that you can develop a software programme to connect to your campaign monitor account and collect some information from it, this is often used to keep a business’s local database up to date.

I was curious to see what kind of information was available through the API so I made a small programme to collect several previous campaigns and see if I could compare them to find which the most successful campaign was.  Is a campaign with the highest open rate the best? Or a campaign which promotes the fewest unsubscribers? Or a campaign which prompts the most forwards? Or perhaps a campaign which has the highest open rate compared to the original size of the list of recipients.

This is what this application does. It will collect a few of your most recent campaign monitor campaigns, collect the number of unique opens, the number of bounces, the number of unsubscribers, calculate the open rate, compare it to the size of the list and show you which of your email campaigns was the best.

best_campaign_recommendatio

It then shows you some details about that particular campaign such as day sent and time send and encourages you to do the same again to try and replicate the same success.

Their API is pretty good and it’s easy to work with. They have their API well documented and provide information and samples for a range of languages that a developer might like to use to connect to their system. If you have any questions for CampignMonitor, they’re very active on Twitter and answered me quite quickly when I asked some initial questions about their API.

There are limits to their API, which was a bummer for what I was hoping to develop. Using their API you cannot access the email content of a previous campaign. I would have liked to see the content of previous newsletters to count the number of words, links and images. If you were one business accessing your own campaign then you would probably have access to your own previous email content anyway.

You can get a summary of each email campaign. It includes information such as subject,  date/time sent,  total number of opens,  the number of clicks, the number of bounces and the number of un-subscribers.

The ‘Total number of opens’ counts every time the newsletter was opened, including if the same person opened the newsletter a dozen times. Strangely, the ‘number of clicks’ counts differently. If the same person clicks a link in the email multiple times it still registers as one click.

Luckily, an API function exists to delve deeper into the Total opens (which I didn’t see at first) and find out who opened the email and how many times they opened each one which allows the Open Rate and the Click Rate of an email campaign to be calculated.

It would be fantastic to see when these users opened the email or when they clicked on links, it would be a great source of information. Its available inside Campaign Monitor but not via the API. It would be a great addition to the Campaign.GetSubscriberClicks function which shows a list of subscribers who clicks links, which links they clicked and how many times.  I see in reports that much of the readership activity of an email newsletter happens within the first 2 hours of a campaign. It would be good to see real world confirmation of this through the API.

In working with this API, I learned a few things that I hadn’t considered until I could see a grid of raw data in front of me. For example, if you send out an email to a few people, and they all read it and forward it to a few friends then your open rate will be above 100%. That’s great but you can’t expect every campaign to have this effect. So what was in that campaign that had such a great effect and how to do it again or how does one get those new readers that have been forwarded to, to sign up?

If you have a Campaign Monitor account, try out the application to find out which of your own email marketing campaigns was the best.

Monitoring incoming and outgoing email with PHP

December 8th, 2009

More than once I’ve tried to be more productive during a working day by limiting the times of the day that I check and respond to emails. I first came across this idea in the book The 4 hour work week and again in Do it Tomorrow.

I’ve tried working with having only certain times of the day when I check my email. It works for a day or so but I usually fail to keep going for any number of reasons such as meetings, phone calls (because I didn’t respond to an email) or even my own habit of opening up my mail without even thinking.

I wondered if the idea was right but that I was trying to enforce it at the wrong times. Rather than trying multiple different time periods I wrote a PHP script to monitor my email usage, watching the times that people email me and watching the times I email other people.

Using a graph of the hours of the day, I was hoping I might see one or more times a day that there was a natural lul in email activity that I could use to work away without checking emails. Looking at the graph there are little dips near lunch and after 5 but no obvious spots during a working day where I could have an uninterrupted work period.

emails_received_november_09

In that graph it shows some emails coming in at odd hours. These are my own automated emails which email me when someone has reached this blog after searching Google. It shows me the search term used. Other than this, I keep other automated emails to another account.

1,365 emails coming in during November works out at about 45 per day or 68 per working day.

emails_sent_in_november_09

427 emails being sent by me in November works out at 14 per day or 21 per working day. I thought it would have been more.

Some day I must look at the amount of text in these emails to work out the average time it takes for me to read and write the emails.

So starting in December I decided to start work a little earlier and see if I could get a few things done before the emails and phone calls get going.

My new habit is getting up at 6am and getting straight to work from home. Luckily my coffee machine has a timer so I can have a pot of coffee ready and piping hot when I wander into the kitchen in the dark.

For a week or so now I’ve been working 6am to 10am without checking my email or answering the phone during that time. I have set my email client (Thunderbird) not to check mails on start-up because I often need to open it to refer to older mails and its calendar without getting new mail.

It’s just less than 4 hours of incredibly productive time. I then head in to the office in The Rubicon where I work the rest of my day where emails, phone calls and meetings can happen.

The PHP script for monitoring the emails

To monitor my outgoing emails, I edited the settings in ‘Copies and Folders’ in the Thunderbird account settings. There is an option there to automatically Bcc an outgoing email.

To monitor my incoming emails, I added an email address to a ‘Forward list’ in the email address settings in the Blacknight control panel.

I then wrote a PHP script to open a connection to both incoming and outgoing email addresses every half hour using Cron. The script opens a POP3 connection, reads in the headers of each of the incoming and outgoing emails to a mysql database and then deletes them.

The information stored to the database are the To field, From field, a copy of the headers and the date/time.

Having copies of the incoming and outgoing emails in this way allows me to interact with my usual email without the scheduled script from missing any emails to record information from.

Another PHP script reads in the incoming email information from the database for each month and creates a bar chart using the Google Chart API.

Here are the main points from the PHP script which reads in the email headers from the server.

Open a connection to the server: (Where SERVER_ADDRESS is your email host address)

$mbox = imap_open(”{SERVER_ADDRESS:110/pop3}”, “$username”, “$password”);

Collect the headers in the inbox currently:

$headers = imap_headers($mbox);

Loop through the headers:

foreach ($headers as $val) {

Get a specific email header

$email_headers=addslashes(imap_fetchheader($mbox, $count));

Pull out some specific information, the ‘To’ field using a regular expression:

preg_match($pattern, $email_headers, $matches);
$email_to = str_replace(”To: “,”", $matches[0]);
$pattern = “/to: (.+)+/i”;

Get the ‘from’ field:

$pattern = “/from: (.+)+/i”;
preg_match($pattern, $email_headers, $matches);
$email_from = addslashes(str_replace(”From: “,”", $matches[0]));

Pull out any other information needed such as the date received or the email client used and then save to a database table.

Label the email to be deleted:

imap_delete($mbox, $count);

End the loop through the headers:

}

Delete the marked emails and close the connection:

imap_expunge($mbox);
imap_close($mbox);

Send me a comment below if you would like me to email you the entire script to connect PHP to a POP3 mailbox, save the headers and display a bar chart using the Google Chart API. The code is a bit much to copy here.

Created a browser agent API with CodeIgniter

December 7th, 2009

I’ve created my first ever API. I often work with and develop applications around APIs from other providers such as the Twitter API or one of the many APIs provided by Google but this is my first time creating an API that others can use.

Built using CodeIgniter, the API has a simple purpose, to take in a browser agent id string and return whether it thinks the browser agent is a bot or a regular web browser such as Internet Explorer being used by a person browsing the web.

Using CodeIgniter made the creating of the API pretty easy. CodeIgniter creates friendly URLs and PHP has the ability to encode a JSON output out of the box. The output is cached for quick performance and usage of the API is logged. It took only a couch, a laptop and an afternoon to get it all going.

Its one of several APIs I’m planning, I’ll be using it for some of my own software products in the future.  I’m hoping to make each one accessible to other developers too, one or more of them might be useful in other peoples applications. Maybe someone might make some cool mashups with them.

As for the information that feeds the API, this comes from a simple PHP script that is on this blog and collects the names of all browser agents that visit the site. One of the other participants on the Genesis Programme I’m on, Garry Bennett who owns and operates www.mytown.ie has allowed me to put the script on his site too.

Mytown gets a lot of traffic, a way more than this blog. His site is the main site collecting all the browser agents, over 330,000 browsers so far.  In the few days that the script is on his site more than 7,000 unique browser agents have been recorded compared to the 400 or 500 that were recorded from my own site in a similar length of time.

I have a page which shows the number of browser agents seen and the number of distinct agents recorded. If anyone has a lot of traffic to their site and would like to help collect browser agent information, please let me know.  The script is a line or two of code for the footer of a page and doesn’t slow down the loading time of a page or collect any other information, just the browser agent visiting the site.

Having a list of browser agents on its own doesn’t do much though. I needed a way to be able to see each agent one at a time and label it as a web robot (an automated programme such as the Google Robot which visits sites to check for new content) or a regular browser agent a person would use to browse the web.

I put up a basic page called ‘Bot or Not’. This page shows a random browser agent 1 at a time and asks the user if the agent they see is a bot or not. Sometimes is easy enough to spot a web robot but not always. A techie person looking at the string would be able to tell easily enough.

Each time a person votes on whether the agent is a bot or not, the vote is recorded. It doesn’t assume the person answering is absolutely correct, it will ask a user to vote on that browser agent again in time and record all votes. The system will label the agent according to which ever has most votes. When using the Bot or Not API, the result you get back contains the browser agent you are testing, its decision on whether the agent is a bot or not and also shows the ‘bot’ vote count and the ‘not’ vote count.

Heres a sample output from the API:

{”agent”:”8feef41ca25f9763304ac81247b22cfd”,”bot_votes”:”0″,”not_votes”:”1″,”decision”:”not”}

The browser agent is hashed to make it shorter and easier to pass to the API, browser agent strings can often be very long and can contain various character symbols that could confuse the system. In the API output about you can see the bot vote is 0 and the not vote is 1 so the overall decision is that this is not a web robot.

Developers could have may uses for this API. They could use is to test incoming traffic to their site to block or redirect bots in case bots were causing the system to slow down with too many page requests of perhaps there is a bot coping content from a site.

I’ve been spending some time rating each browser agent myself using the Bot or Not page. Of the 7000 or so unique browser agents there, nearly 700 of them are obvious bots, such as the MSN, Google and Yahoo bot. If you have a minute, rate a few of them if you can.

Ironically, something I forgot about when creating the Bot or Not page was that bots such as Googlebot will be visiting that page too and clicking on the ‘bot’ and ‘not’ links.  I’ll be my own first customer to use the API to examine if the votes were made by bots or people.

Using the API

If you want to use the API, please do. To access it use the following URL

http://api.murrion.com/agent/[MD5 of Agent to Test]

Example:

Testing the browser agent :

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)

Use the PHP md5 function:

md5(”Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)”);

Call the API with the md5 output:

http://api.murrion.com/agent/1b08a1420f959565a86c4554cc16f81f

JSON output

{”agent”:”1b08a1420f959565a86c4554cc16f81f”,”bot_votes”:”0″,”not_votes”:”1″,”decision”:”not”}

That browser is not a bot.

traffic from a competition

December 2nd, 2009

For the last week or so, I had a caption competition here on the blog. The 5 winners received 2GB USB keyrings compliments of Littlequiz.com

It was a fun picture taken of me working outside in a large pool that had formed due to the heavy rains in Cork recently.

I discovered 3 new things from running the competition:

  1. A fun caption competition can bring a lot of traffic to a website
  2. Facebook can bring in lots of this traffic, I thought Twitter was the king at this
  3. One of my Wellies has a couple of tiny holes (which I have since rectified with some super glue)

google_analytics_graphOn the graph there’s a clear hike from my usual number of visitors per day. Google and Twitter brought in the first wave of visitors.

Facebook on its own brought in the rest on the second blip on the graph, peaking just over 300 visitors on that day.

A couple of people put the image up on their facebook pages which is where this traffic came from. Thats a nice amount of traffic to my young blog. It would probably have been more or have a longer tail if it wasn’t on a Friday and Saturday.

So a fun caption competition happens to be a good source of traffic mixed with Twitter and Facebook too. I recommend trying it.

Check out some fairly regular caption competitions on Littlequiz.com

caption competition winners

December 1st, 2009

The 5 winners of the caption competition, winning groovy 2GB USB keys from Littlequiz.com are :

Ger Swanser

…’dear diary, when i asked for an office with a ‘light airy feel’ i think they took me too literally…..’

Paysan

AIB repossessions get serious…

Marcela

So you got an invite for Google Wave, then

Tomas McGuinness

As Gordon read through his email, he began to get a strange, sinking feeling….

Patricia Doyle

This online f(psh)ishing is not all its cracked up to be

Thank you everyone for all the great comments, it was good fun reading through them.

I didn’t pick out the winners in case I was biased in any way so I asked some friends and family to read through them and pick out 5 of the best. I’ve emailed each of the winners earlier this morning.

My nephew Donal tested the quality of the prizes before they go out in the post.

donal_sorting_prizes

Author: Gordon Murray Categories: business Tags: , ,

Working outdoors is not all its cracked up to be

November 19th, 2009

Trying to work in this weather..

Thanks to the Monkeys at Littlequiz.com, theres a free 2GB USB stick for the 5 best captions for this picture.

Update: I’ll close the competition this Friday the 27th and ask some friends and family to pick the best ones. Thanks for all the entries so far..!

working-outdoors-in-a-flood

Which links are users pressing to leave a page?

November 10th, 2009

Murrion Software HomepageA few months ago I wrote a script to monitor the links on a webpage that users are clicking on to leave the page.

The script is a combination of; CSS to label the links to be tracked, Javascript to trigger the code when the link is clicked and finally PHP to store the time, current page, destination page, browser agent and IP address of the user.

The links use a Class within the link to label the links to monitor  and doesn’t change the link itself, retaining any referral address.

I wanted to test this out over time and give it an easy page to work with rather than putting it on to the blog straight away to monitor the links there.

I put the script on my own Murrion Software homepage which is a simple screen showing a logo and 3 links. This links go to this blog, a ‘tools’ page containing other free tools and scripts and also to a ‘contact’ page.

Here are the (rounded)  percentages of clicks each button received from August to October inclusive.

‘Tools’ link :  41%
‘Blog’ link : 31%
‘Contact’ link : 17%

10% left the page without clicking any link.

It’s not quite a heat-map but it’s interesting to see. I’ve swapped around the buttons now to see if their position has any influence on clicks over the next 3 months. I imagine there will be little or no difference.

Author: Gordon Murray Categories: development Tags: , ,

murmurs 25/09/2009

September 25th, 2009

After Bizspark for Startups, Microsoft launch WebsiteSpark programme for Web Developers and designers .

Barcamp Cork the 3rd is confirmed for November 14th.

A great service for storing passwords, free online password manager www.passpack.com (Via @alexleonard)

In the wake of a blog post from Pat Phelan, James Corbett kicked off ‘OutVesting‘ whereby people on Twitter pledge to donate 50 Euro along with 99 others to give 5,000 Euro to a startup. In what I believe was under a week, 100 people have already pledged to donate 50 Euro. More on http://www.outvesting.org/

Little Quiz, know a little, win a lot!

September 22nd, 2009

Little QuizLittle Quiz launched this week offering a chance to win a spanking new Sony Ericsson walkman phone compliments of their first quiz sponsor, downloadmusic.ie

To be in with a chance to win the phone you just answer 3 simple questions, that’s all!

The monkeys behind Littlequiz must have lost their marbles because they’re just giving stuff away. If you sign up to the newsletter you could win €100 in cash and there’s even a page dedicated to how to win prizes.

I’m looking forward to seeing more prizes on offer on the site from week to week. It’s a great looking site and I hope plenty of sponsors come onboard to help out and promote their own products at the same time.

Try out this weeks quiz  on LittleQuiz