Menu Get a free quote
My blog
Writings on web design-related subjects
   

Blog page 1 of 13


Convert PHP strings for use as JavaScript strings

Sometimes you may have a string that you wish to output either as a JavaScript string or within a JavaScript string. Like PHP, JavaScript allows you to use either single or double…

Read More

Retaining PNG transparency with PHP GD

If you’ve done image processing the PHP and GD you may have noticed that when working with PNG files transparency is not retained. By default GD uses alpha blending; this means tha…

Read More

Questions to ask before choosing a web hosting company

I recently had a small disagreement with a new client’s IT company about who to use for their web hosting. I strongly recommended the client go with a company I use to host many of…

Read More

How to prevent a web designer/web design company costing you money

I had two conversations this week with potential clients who were quite rightly concerned about how their money would be used on their new website. One had already been burned by a…

Read More

Create a search engine-friendly slug/URL from a string using PHP

Making nice URLs is a given now. Here’s how to make a nice-looking slug from any string. It should work well on any latin-based character sets. I personally like slugs all lowercas…

Read More

Dynamic/automatic robots.txt file with PHP and .htaccess

Worried about accidentally publishing your test site robots.txt to your live site robots.txt and thereby blocking the search engines from your site? It’s an easy mistake to make an…

Read More

How is a website made responsive for mobiles and tablets?

A responsive website is one that “responds” to the platform the visitor is using. Most commonly this is the screen or browser size. For example, if the browser width is less than a…

Read More

Add a click event to html or body on iOS using jQuery

If you’ve ever tried to add a click event to html or body in jQuery, you’ll have no doubt found it doesn’t work on iOS. Click events do not bubble up to the html or body tags in iO…

Read More

Create a GUID with PHP

A GUID is a globally unique identifier; it’s a 128-bit hexadecimal string. There are so many possible GUIDs that you can assign them to any data record and be fairly confident that…

Read More

PHP’s mcrypt ciphers, block modes, block sizes and IVs compared

Below is a comparison of PHP’s mcrypt ciphers, block modes, block sizes and IVs. Note that some ciphers support multiple key sizes. Also note that some ciphers are made for encrypt…

Read More