My buddy Chris asked for some help the other day on submitting a contact form via AJAX. We had a debate on the best structure for doing so and I explained about using JSON for the AJAX response message from the form processing script. My preferred method is submitting a form via AJAX to a PHP script for processing the form. The PHP script returns a JSON response with whether the form submission was a success or not. I thought this would be a good tutorial so I whipped up a quick sample for everyone.
In my first post, , about piping email with PHP, I detailed how to set up qmail to send an email to a PHP script, read the email, output it. Now that you have the basics down, we can get into more email processing with PHP.
Email piping is a really useful trick if you want to parse emails sent to you with PHP. I’ve used it a few times now for a support ticket system I built as well as to detect bounce emails from a mailing list and remove invalid emails from the list.
Many times we need to use multiple copies of the same image on our sites at different sizes. Instead of having to worry about managing multiple copies of the same image, we can use PHP with the GD library to create thumbnails of our full size images.