It’s a service that sends an SMS with forex rates to your phone. I don’t have time to finish development. However, it works right now only with EUR/USD. All made in php. Grabs forex data from a free source. Uses a cron job to send the daily sms. I was gonna have a few more abilities, like choosing which pairs you want to send and at what time.
Category: web
Must Have WordPress Plugins
Here is my list of WordPress plugins I use on my of my sites I deploy:
- Contact Form 7 – This gives you a great looking contact form. Highly customizable with an option for adding a captcha.
- Akismet – Stop spam. This comes with every WordPress install. You need a key for it, register at wordpress.com. It’s free!
- Google XML Sitemap – Add a good XML sitemap for your site.
- WordPress Auto Upgrade – This makes upgrading the most easy thing. No excuse to not keep your site safe and up to date.
- WP Super Cache – I use this on the sites that get a lot of traffic. There is very much a noticeable difference when you use this. It really speeds your site up.
- Twitter Tools – Best Twitter plugin for WordPress. Use this to tweet your blog posts.
- Lightbox 2 – Makes your images show up in a lightbox. Extremely handy.
- Chili Code Highlighter – Best plugin to syntax highlight code. You can see examples of it on my site here, Write on images with PHP
- WPrecaptcha – Akismet and this plugin will stop all spam. Must have.
- WPaudio – This is great if you want to share some mp3s on your site. I use this here on my site, My New Ringtone
What plugins do you use? Leave me a comment!
Online Backup Solutions
I have recently got the urge to start backing stuff up. I found a couple online companies offering this service so I decided to try them out.
First is a product called iDrive from http://www.idrive.com
iDrive gives free users 2gb of storage. For me this is plenty to backup some important documents. Their little program you download is quite nice. It is easy to use and explore, allowing you to see right away what files you are backing up and how much space you are using.
The three main buttons in their program are Backup Now, Schedule Backup, and Enable Continuous Backup. It has a default scheduled backup time of 5:00AM every day, but that is easily changeable.
The restore feature is nice as well. It will show the files you have stored with them and allow you to choose which ones you whish to restore to your computer.
There is integration with your OS, but under Windows XP I was prompted to install the plugin for it, it didn’t install along with the program. They do have support for Windows, Mac, and Linux. As well as some mobile applications.
Overall, this was a good option to use if you like something with a bit more options and like to tinker with settings to have full control over things, but it seemed like it was just more work than I wanted to do. I give this application a 4/5 stars.
The second application I used was Dropbox from http://www.getdropbox.com
Just from the website alone you can tell Dropbox is more slim and condensed.
They also offer a free 2gb account, which is plenty for me.
I downloaded their application and was pleasantly surprised. Their application is all integrated into Windows. When I want to backup a file, I just drag it into a folder called My Drop Box which they put in My Documents.
They also have a system of synching. You can run it on multiple computers or phones, and when you save files, it can synch to all devices. Pretty handy feature.
Folder sharing is also very easy and makes it great for letting other people have access. For me, this will come in handy when I’m working with people on projects. They have a Public Folder as well that allows anyone to see the files which you put in there.
Dropbox also have some 30 day undo history. Might come in handy if I make mistakes. They also offer an unlimited undo feature called “Pack-rat”.
The online interface for Dropbox is amazing. So simple and great looking. You can upload a folder of images and it’ll generate a photo album. Pretty slick.
I give Dropbox a 5/5 stars and recommend it for sure!
jquery password plugin
I found this really really simple jquery plugin for registration forms and what not.
It does:
- password metrics (tells you if its a strong password or not)
- submit lockout (user won’t be able to submit form until everything is good)
- minimum strength requirements (user needs to have a password of X strength)
Here is a demo of the script: http://www.thecreativeoutfit.com/freebies/passroids
You can view the options and download it here: http://www.thecreativeoutfit.com/index.php?view=jQuery-Password-Plugin
htaccess redirects
I recently had someone ask me if they could set the priority of some pages. In this specific case they wanted index.php to take precedence over index.html. Well, on shared hosting you can’t change the server config to do this (which by the way is in the httpd.conf for Apache). So the next best thing to do is .htaccess redirects.
htaccess will only work on Apache webservers, if in doubt consult your webhost. To use these, you will need to create a text file and call it htaccess. Input code from below into it to suit your needs, and upload to your site via ftp. You will then need to rename the file to .htaccess
There are a couple different codes that are returned to the browser on redirects.
301 – Permanent Redirect. Good for moving files forever. This tells the search engine and clients that it has moved permanently and should use the new URI.
302 – Temporary Redirect. It tells the search engine and client that it’s redirecting and should continue to use the requested URI.
Here are some sample redirect usages:
301 Moving a single page
Redirect 301 /oldpage.html http://www.example.com/newpage.html
301 Move entire site
Redirect 301 / http://www.example.com/
To do 302 redirects, just replace 301 with 302.
write on images with php
I recently had a client that wanted to generate those dynamic images with text on them. I know you’ve seen them all over. The ones with the nude chicks holding signs saying “Alberto wuz here” or whatever. Truth is, these fan signs are really easy to make.
For this example I’m gonna use this image:
In order to write on images, you’re gonna need the GD library installed in your server. Most of the time this is already done if you’re using shared hosting or if you’ve already got a working webserver.
Save and upload that image into a dir on your server, and we’ll begin working.
We want to be able to input any string of text so we’re going to make a form for submission. Create a form using:
<form action="img.php" method="get"> <input type="text" name="line1" /> <input type="submit" name="submit" value="Do it!" /> </form>
As you can see, it’s not fancy, but it works.
Lets start off with the “Hello World” example. Save this as img.php
<?php $string = $_GET['line1']; // lets get the text from the form // define what image we want to write on $im = imagecreatefromjpeg("sign.jpg"); // define the text color, red, green, blue $textcolor = imagecolorallocate($im, 61, 61, 61); $font = imageloadfont('Brigitte.gdf'); // tells it what font to use imagestring($im, $font, 175, 395, $string, $textcolor); // line o'text // header to tell the browser it's an image header("Content-type: image/jpeg"); imagejpeg($im); // creates the image with text imagedestroy($im); // destroys the image in the memory ?>
Let’s take a look at whats going on here. From the comments you can tell whats going on for the most part, but I can expand.
Line 1 of the code is using the GET method from the form we created to store the text in a variable called $string.
imagecreatefromjpeg() PHP function tells PHP that we want to use a JPEG image. PHP has functions for GIF, PNG and strings, BMP, XBM, XPM, and from GD itself.
We then allocate the colors we want to use for the text. imagecolorallocate() uses RGB values to do this.
imageloadfont() loads our font for writing. It can be a bit tricky to find a font suitable for writing on images and I’ve included a few in the download at the end of this article with the rest of the code. There is, however, a great program that allows you to take any Windows font and turn it into a GD font. You can get this program from here: http://www.wedwick.com/wftopf.exe
The fifth line of code is where PHP does the writing. It takes the image, font, X and Y coordinates, the string (your text), and finally the text color and writes on the image.
The header() is basic PHP to tell the browser what kind of content it is viewing, in this case an image.
PHP then creates the image, and destroys the temp image in memory. You should now have something like this:

Afterthoughts: You can create a form that does POST instead of GET for a bit more “security” through obsecurity.
You could use one page for all the code, but I used two to help newbies.
Download archive with project files here: php-gd.rar
Here is the script in action: http://riscit.info/dynamic_image/input.html










