1. Skip to Navigation
  2. Skip to Content
our blog

Archive for PHP Category

WordPress: Send Notification E-mails On Publish

We recently developed a site for a client that allows visitors to submit their stories using a custom form. The stories then go into a queue to be reviewed for approval by an Administrator. One requirement was that these user’s be notified by email if their story was approved.

After not finding any plugins designed specifically to do this, I cooked up a little function that I thought I would share.
(more…)

WordPress: How to Exclude Categories From the Archive Widget

Updated: 5/2/2012

We love developing in WordPress. For many of our clients, there is no need to reinvent the wheel and WordPress can be a significant time saver.

WordPress is a very thoroughly developed platform – yet every now and again we bump into desired functionality that isn’t readily available, such as excluding categories from the Archive Widget.

Recently, I developed some code to do just that and thought I would share it.
(more…)

Display Recent Spotify Track with Album Cover using PHP

Many of our clients show their personalities on their websites – from Facebook to Twitter feeds, photo streams and more, they like to integrate a bit of themselves. While hooking up a Social Media feed is no problem, recently we had a unique request to develop a widget that displays the most recently listened to Spotify track with artist information and album cover.

It turns out there isn’t a straightforward way to do this; after a little digging around on the internet, and the help of the Spotify API, we were able to put together a solution that I wanted to share.

There are several steps to this process:

  1. Create a Lastfm account and setup Spotify to scrobble to Last.fm
  2. Pull the Lastfm Recent Tracks RSS feed
  3. Look-up the desired Track using the Spotify Metadata API and load the data

(more…)

Finding the Carrier of a Cell Phone Number in PHP

Often web apps need to send SMS messages to their users (for example: balance alerts, reminders, notifications). To send these text messages from within your app, you basically have 2 options:

1) Pay Twilio and Tropo for the use of their APIs, for roughly a penny per message.

2) Send an email directly to their carrier’s mail-to-SMS gateway – a free service most carriers provide, which will translate your email into an SMS sent to their subscribers’ phone

Twilio and Tropo are about as easy as it gets to integrate (REST-like APIs that return JSON/POX), but you pay for every single message and that can add up quickly. So #2 (mail-to-SMS gateways) starts to look pretty good.

But there’s some problems with mail-to-SMS gateways: (more…)

Facebook Graph API requires Access Token for Feed Access

On June 3rd, Facebook updated the Graph API to require an access token to pull wall post data from public Facebook pages. This change can cause scripts to stop working, so here is a quick solution to pull wall post data from public Facebook pages with an access token. (more…)

Free Webservice to Geocode IP Addresses Saves The Day

At Illuminati Karate we love a challenge. So when our client called needing two lists of 1500 IP addresses geocoded as quickly as possible, we rose to the occasion. With the help of PHP and a freely available web service we were able to complete the task in just under an hour. Here’s how we did it.

(more…)