Archive for the 'PHP' Category

More websites updates

Saturday, November 5th, 2011


I’ve recent updated the main page of my website. Ever since Facebook first took off I’ve been trying to figure out how to give the various things that dribble out of my mind and are fit (or not) for on-line consumption a proper home. A proper home, might often have been my blog, but more often than not it was easier to post it to Facebook or Twitter — both for the shorter length and the immediacy of the tool.

To accommodate this I added my Facebook, and then Twitter status to my web site as the constant “first blog post”. This sort of worked, but still didn’t provide an ideal summary of information.

I’ve tried again, this time focusing on mattclare.ca. There’s a little more of a summary of of the blog, focussing in the titles and images, with some teaser text.

Further I’m hoping to write more on the blog, and more pictures etc.

One thing I still refuse to do is narrow the focus of my posts, that will still range from server admin, to ed. tech. to F1 and fatherhood.

Here’s hoping.

Moved VPS’es

Thursday, July 28th, 2011

Over the last month I’ve moved from my previous Virtual Private Server (VPS) with A2WebHosting to Linode.

A2WebHosting was a good host back when I only needed a shared host, before I wanted the apache web server highly configure with a lot of extra settings and things like PHP’s APC. My transition to A2WebHosting’s VPS service I was not that great. I’ve run basement servers that were more reliable.

A lot of the frills of having your own virtual server weren’t there with A2WebHosting, but what was worse was for the first year I wasn’t able to load any kernel modules…. like ipfilters – the firewall! — I wasn’t too public about that problem. Also the drive was often so slow (I/O wait) the site slowed to being almost unresponsive.

I’ve now transitioned to Linode. A VPS host only. I first discovered them when tracking down where comment (wiki) spam bot traffic was coming from — the hackers know where to find value.

Their recent increase in storage ensured that their low-end offering was much better than what A2 offered. I’ve since really appreciate their custom web-dashboard and iPhone app for managing servers.

I’ve also transitioned from a CentOS host and the Red Hat / RPM world to Ubuntu. The recent politics around the CentOS releases sealed the deal in me moving from the free version of the “enterprise” standard to Ubuntu’s well respected and also free Linux version.

So now that I’ve got this new, more reliable virtual server with more resources I think I need to start coming up with some more web projects soon!

RimCount.com RRRR’eturns

Friday, February 25th, 2011

My little hobby web site for tracking your luck with a large Canaidan coffee and donuts chain’s roll-up promotion is back!

My previous attempt was Drupal-based, and required an account. I was never very happy with the account requirement, and played with it being a facebook App but ultimately took the site down (described in this blog post). This time there’s no need for an account as it’s Twitter-based. This also helps with the promotional side of things.

I had hoped to partner with the www.rimrollerapp.com – but that Twitter based iPhone App needed a technical update, and for other reasons, it’s now removed from the App Store. It’s too bad, but you don’t need anything beyond a Twitter account to enjoy RimCount.com.

Simply tweet with the tag #RollUpTheRim to have your tweet listed on RimCount.com. The site tracks results posted to Twitter in the format of wins/rims (and unofficially, a few other formats).

You can visit the main page for the latest, the scoreboard for the best and worst ratios rimcount.com/scoreboard. There’s also a rapidly growing list of Twitter users who have tweeted with the hashtag #RollUpTheRim rimcount.com/list

The site is no longer Drupal-based, but some of the PHP from the Drupal module I wrote and the MySQL data structure were migrated to the new site which is otherwise built from scratch.

As many developers have indicated, working with Twitter.com‘s non-standard API is quite a joy. I was able to get things rolling (pun intended) quite quickly based on the simple twitter searches through Twitter’s search service’s RSS feed and looking-up someone’s Twitter details via an XML call is easy too.

PHP script to download files from GMail

Wednesday, December 15th, 2010

While my wife was getting a valuable two hours of sleep before she was woken with contractions signaling the birth of our first born child 19 hours later, I was not quite tired enough to sleep. UnknowingIy missing out on my last chance to sleep for a while, I was typing away at a PHP script to allow us to share pictures of our new baby – whenever he was going to arrive – with our friends and family privately with nothing more complex than the ability to eMail photos from my iPhone.

It was important to us to be able to share these pictures of our new child, but also to protect our child’s image from the very public exposure of the public internet and the still too public (or at least, un-trustable privacy of) Facebook.

Here’s how I was able to achieve this with a web server, some PHP, a GMail account and my iPhone:

Creating Galleries
First off I created a folder with standard Apache Basic Auth settings and let our friends and family know the simple username and password. I also turned on WebDAV access for the geekier viewers. In order to construct interesting galleries I placed a copy of Qdig, a Quick Digital Image Gallery PHP script to create galleries and thumbnails on the fly (and secured it against the WebDAV access). I had to increase the amount of RAM PHP could use, but otherwise it was very easy to implement.

Getting eMail Attachements from GMail with PHP

I created a new GMail account (specifically through my Google Apps domain) to receive all of these cute baby pictures via eMail from my iPhone. The next step was to check it automatically and store the attached pictures in a specific folder.

Birth Blog Announcement of Evan Clare

Monday, November 22nd, 2010
Doing tricks for Aunt Shealyn

My wife Lindsay and I are excited to announce the birth of our first child: Evan Isaac Clare

Evan was born on Tuesday November 16th 2010 at 19:33 at Joseph Brant Hospital in Burlington, Ontario Canada. He was born 7 pounds 10 ounces, 8 lbs 4 as of Monday November 22nd.

His four grandparents, two aunts, one uncle and many others in the GTA have all had a chance to hold him. He’s even been held by one of his three great grandmothers.

Thanks to everyone who have sent their congratulations, cards gifts and love. He’s blessed to be born into such a caring community.

Full gallery can be found here

Roy Tanck‘s Flickr Widget requires Flash Player 9 or better.

Get this widget at roytanck.com

Lindsay and I have setup a private web site with a lot more pictures of us and Evan. If you feel like your one of our close friends who should have access and don’t please send one of us a E-Mail and we’ll be sure to make sure that happens. At a later date I’ll create a post that describes how a leashed a GMail account to a PHP script and private web site to allow us to send updated pictures of Evan from our smart phones so that our close friends and family could see the little guy’s cuteness ASAP but giving as a lot of control over those images.