Email Marketing Software and Services

Handling email, whether it is for a newsletter, autoresponder, drip campaigns, etc., is one of those things that doesn’t seem so challenging until you try to do it. And, in fact, for small volumes, it probably isn’t that difficult. But, once you start getting any significant number of subscribers, things get complicated. You want to make sure your server can handle the volume and you … [ Read more ]

Text Size Switcher

Update (January 1, 2017): I have now switched to using a modified version of code found in the font resizer WordPress plugin, but the code below is still useful on its own and as a tutorial on the topic.

A useful and common accessibility feature is a text size switcher. This is a tool that allows users to alter the size … [ Read more ]

Regular Expressions (Regex or Regexp)

Regular expressions (abbreviated as regex or regexp) are used by many text editors, utilities, and programming languages (in our case, PHP) to search and manipulate text based on patterns, most notably the presence of particular characters, words, or patterns of characters. Regular expressions are somewhat archaic in appearance and can be very intimidating to those not experienced in their use, but once you see how … [ Read more ]

Useful Code Snippets / Tutorials – PHP

  • Remove or replace a block of text with definable starting and ending pattern.

    $temp = preg_replace(“‘


    ‘si”, “”, $temp);

  • Modify group of links.
    This could be useful, for example, if you have links to multiple articles on a website that then redesigns and thus all its URLs change.

    $temp = preg_replace(“/(.*)/i”, “3“, $temp);

  • What’s the easiest way to remove characters from the end of a

[ Read more ]

Useful Code Snippets / Tutorials – JavaScript

[ Read more ]

Forum Software is a forum product from Lefora. Just grab the embed link, put it on your website and you’ve got a forum. And users don’t have to create accounts – they can sign in via a variety of services like Facebook, Twitter. Google, Yahoo or OpenID.

Upload Images with PHP

Web developers who are just getting started often ask, “How can I upload images using PHP” The Web Developer How To – Upload Images Using PHP tutorial looks at the basics and shows you how you can install such a script on your website.

Bad Behavior / Bad Behaviour

Bad Behavior is a PHP-based solution for blocking link spam and the robots which deliver it. It complements other link spam solutions by acting as a gatekeeper, preventing spammers from ever delivering their junk, and in many cases, from ever reading your site in the first place. This keeps your site’s load down, makes your site logs cleaner, and can … [ Read more ]

PDF: Working with PDFs on Your Website

Offering a PDF Option for Your Pages

If you want to offer your site visitors a PDF of a page, PDFmyURL might be a good option. On the PDFmyURL site, click the “Advanced Options” (on the right), and you’ll learn how to pull off PDF production without even visiting the site, embed advanced options, and even run PDFmyURL from your own server.

Alternatively, I recently had … [ Read more ]

30 Fresh AJAX Tutorials And Techniques

Using AJAX on websites and applications is pretty much taken for granted nowadays. Users expect it. They want search queries to be auto-suggested, and they want to be able to edit a page or submit a form without refreshing the page. Why? Because those things make browsing quicker, easier and, more importantly, enjoyable.

As great as AJAX is, though, it is not for every website or … [ Read more ]

Faux Absolute Positioning

There are two popular approaches to positioning with CSS: float and absolute positioning. Both approaches have their pros and cons. Eric Sol offers an article on A List Apart, “Faux Absolute Positioning,” which describes a new positioning approach that gives us the best of both worlds.

Progressive Enhancement with CSS

Aaron Gustafson has written a very interesting article on A List Apart titled, “Progressive Enhancement with CSS.” For those not in the know (including me before reading this article), progressive enhancement is just a fancy way of describing a structured approach (as opposed to the haphazard ones used by most DIY webmasters) to designing your websites for cross browser compatibility. There are many ways … [ Read more ]

Single Line If…Else Statement

You undoubtedly are familiar with using if…else (if else) statements in your PHP programming. Are you also aware that for simple if…else needs (e.g., only needing to set one variable) you can get by using only one line of code?

The basic format of the one line if…else statement is:

$variable = (if statement) ? if true code : if false code;

Let’s illustrate with an example. … [ Read more ]

Running PHP Scripts in Command Mode

Most of the time, we write PHP scripts with the idea that they will be run directly in a browser (HTTP). Occasionally, we want to run a script directly from the command line (e.g., in a SSH environment or via a cron job). Unfortunately, running these scripts from the command line can cause problems since most HTTP environment variables are either not available in the … [ Read more ]

Identifying a Compromised Script Sending Spam from Your Server

When you use third party software programs, both open source and commercial, there is an increased possibility that they will have security flaws which are exploited. This is true because the programs are well-known, often make the source code publicly available, and because hackers realize that security holes in these programs will exist on a lot of servers.

Recently, I noticed that one … [ Read more ]

JavaScript Alert and Confirmation Boxes

An alert box is a small dialog box that provides a user with important information. The most common uses are to inform (“alert box”) the user about errors (e.g., especially with form validation), to provide simple help messages, or to require confirmation (“confirmation box”) before allowing certain website actions. You’ll often see the confirmation box used before the applications performs a task that cannot be … [ Read more ]


The PHP Extension and Application Repository, or PEAR, is a framework and distribution system for PHP code components. Stig S. Bakken founded the PEAR project in 1999 to promote the re-use of code that performs common functions. The project seeks to provide a structured library of code, maintain a system for distributing code and for managing code packages, and promote a standard coding style.

While PEAR … [ Read more ]