E-Mail Obfuscation

Most webmasters realize the importance of hiding e-mail addresses on our websites from e-mail address harvesting spam bots. Over the years, many methods have been used to address this problem. Many are simple reconfigurations of the text displayed so that only a human can perform the logical analysis to figure out the real address. These are of the form: [email protected], contact(at)company(dot)com, contact at company dot … [ Read more ]

AJAX Select Box (Other) Form Element

If you’re like me, you have certain form fields that need to allow users to add an option. For example, if you wanted to ask a user filling out a form for their university, you can’t realistically expect to have a table with all the possibilities from around the world. Instead, you can have what I call a select box other field (a.k.a. list box), … [ Read more ]

Functions and Passing by Reference

A function can be written to accept parameters (variable) or not. A parameter name is local to a function unless you tell it otherwise by using the global statement. Thus, you can pass a parameter called $string and name the accepted parameter $string also and they won’t interfere with each other. For example

In the function above, $string outside of the function will remain “car” … [ Read more ]

Ping

A ping, more formally known as an XML-RPC ping, is a method of allowing two websites to communicate with each other (via the XML-RPC specification). The most common use these days is for blog software to tell RSS feed directories and aggregators that a new feed has been published. If you aren’t using blog software for your site but would still like the ability … [ Read more ]

PHP Search Routine

A decent search function is a must for any serious site. There are countless ways to add search to your site, some very simple and some quite complicated. You can use a hosted service (like Google), a third-party script or you can design your own. If the latter interests you, I offer some sample code that I developed for this site, albeit in a slightly … [ Read more ]

Useful Code Snippets / Tutorials

Occasionally I come across useful sample code or tutorials. Many of these I don’t actually end up using, but since they are useful for learning or possibly for a future use, I save them.