CodeIgniter Diary Day 20

So i see that I'm 20 days into this little project, CodeIgniter is certainly growing on me as i add some little thing every day. I've added an RSS feed, and developed a little Logging, IP Geolocation and Browser Detection Class, too.

RSS Feed

I created an RSS Feed based on the Derek Allard tutorial here. Easy, just took a little tweaking to fit my schema. So now you can subscribe to osxsux rss feed here.

Logging and Geolocation Script

i pieced together a spiffy little Logging and IP Geolocation class. It uses the geolocation service provided by infodb.com if it's working properly, you should see a little message at the bottom of the home page sidebar asking you 'How is the weather in {your city name}'. Before you even see this, your visit was logged with the following information(example):

ip - 174.115.140.241
referer - www.somewhere.com
page_ref - somepage
browser - Firefox
country_code - CA
country_name - Canada
region_name - Ontario
city - Newmarket
zippostalcode - M3Y5V7
latitude - 44.05
longtitude - -79.45
timezone - -5
has_cookie - 1

I'm using it to track article views as well. I think I might package this up nicely and offer it as my first CI Library! (Actually, like many CI classes, it is useful outside of CI as well). Oh yeah, it does browser detection as well, using a snippet from Techpatterns. TODO items: It's doubling hits for some reason (one hit counts as 2, gotta look into that), and it counts page reloads, a little more time to waste...

//TODO

  • I have that Search box on the home page which doesn't currently do anything.
  • Contact form, not that anyone would want to contact me anyway...

Anyhoo, time to make money, gotta go to work.

Your Comment
(Not displayed)
 Prove You're Human

No comments on this article... yours could be the first!