Apr 07, 2011 — 5 comments
This is an HTML and PHP script that helps to stop email bots from filling your forms out automatically.
Since the first article I submitted to Digg was voted onto the front page a couple of days ago, we're going to add onto the script and make it update the conversion rates from a website that keeps track of them all. This is quite a jump from the first tutorial and so buckle your seatbelt, Dorothy, 'cause Kansas... OK, 'nuff of the Matrix quotes. Let's begin...
We're going to be dealing with type juggling in this article. This is the process of instructing PHP how to handle the value after the type juggling. Type juggling can do absolutely all sorts, from converting integers to floats, arrays to objects, and even strings to binary as of PHP 5.2.1. It can also save you calling various functions and thus making your script quicker!
Learn to use the PayPal ExpressCheckOut PHP API. Downloadable code included.
How to use an .htaccess file to automatically redirect requests for files that may have moved following a site redesign. This really useful technique will stop your users getting "page not found" errors after bookmarking pages on your site that no longer exist. Also solves problem of search engines that haven't caught up yet with your new site structure.
Nice tutorial on using the Yahoo search web service with the classes from the Zend framework.
Within this article, we'll be taking a closer inspection of exceptions, as requested by the lovely Haris. This will be a basic exceptions article and so I won't be going over how to extend onto the exceptions class to model your own - otherwise we'll get too far ahead of ourselves. Exceptions tend to be used where we have no jurisdiction over the source, and when we wish to return a more informative message to the front-end.
When you create an interface, you're basically creating a prototype/blueprint of functions that classes using the interface must implement in order to be valid. It's usually easier to learn from example, so here's a basic interface that represents a Page.
Sometimes we need to create functions that require an indefinite and variable amount of arguments. Creating a function to cater for these arguments may seem straight-forward; I've seen several people who have created functions with five or so arguments and if they required a sixth argument at any stage during their project's development, they added the sixth argument to the function and carried on as normal.
Using the Timezone class to automatically deduce the timezone's GMT offset and then modify the date accordingly. I must admit that I was going to write you a simple timezone script and then tell you how easy it was. However, I came across some handy timezone_* functions and things got a little more difficult but a lot more practical. This script will allow you to display the time in any timezone you wish, without any ifs, buts or maybes along the way.
Help us out! More and more tutorials are submitted to Good-Tutorials each day. We could use your help with finding good tutorials. Mind lending a hand?