In this tutorial I’m going to tell you how to create simple images from PHP with help of GD library in just a snapshot. If you don’t have GD library installed you can download it: GD Lib

In PHP creating a simple image requires a number of functions. I’ll step through them one by one.

Read the rest of this entry »



How to Add Dimensions

In the previous part of this tutorial we learnt how to draw lines with a spoon feeding library and in this part we will enhance our PHP graphics library and learn How to Add Dimensions, Group Class and How to Develop a Viewport and more… so lets start.

With the first requirement: the ability to have graphic objects out of the way, it’s time to move on to the second requirement: the ability to position objects above and below each other using a z dimension.

Think of each z level being like a plane the size of the original image. The drawing elements are drawn in order from lowest

Read the rest of this entry »


Learn How to Generate Graphics in PHP

Today we are going to learn PHP Graphics….no it’s not a new tern basically today we will Learn How to Generate Graphics through PHP and believe me, it’s nuisance convention that it’s hard to learn graphics in PHP or it’s hard way to generate graphics in PHP. No, the truth is, it’s 100% very easy and spoon feeding but one should must know the concepts before playing with it, that’s it :) Without knowing concepts people do worst talks.

I divide graphics editing programs into two distinct categories: painting programs that let you tweak an image pixel by pixel and drawing programs that provide a set of objects like lines, ovals, and rectangles that you can manipulate until you render the drawing to a flat image like a JPEG.

Read the rest of this entry »


How to Block Spammers to Misuse Feedback Form

As we may all noticed many websites no longer post their webmaster’s email addresses preferring instead to put up a contact or feedback form. Without the plethora of email addresses to harvest from websites, spammers have turned to using such feedback form scripts to send spam instead. As we are writing our own feedback form script, it is important that we write our script in such a way so as to prevent spammers from hijacking the script to spam others.

 
Understanding Spammers Way of Working

A PHP script that sends email, as we created sendmail.php in previous tutorials typically calls on the mail() function to deliver the email.

Read the rest of this entry »



Adding More Features to Feedback Form

Before we start if you want you can recall the previous parts of this tutorial:

How to Create Feedback Form in PHP - Part I
How to Create Feedback Form in PHP - Part II

Now we can also improve the script and feedback form in the following ways:

1. Add support for your visitor’s name. Otherwise when you reply, you would not be able to address him or her by name. You will of course need to code your script so that it includes those fields. For example, if your name field is called “name”, you might want to modify your call to the mail function as follows:

Read the rest of this entry »



How to do Form Validation in Feedback Form

In first part of tutorial we learnt and created a simple but useful feedback script, which transmits the contents of a feedback form to webmaster through email and today we are going to refine our feedback script by putting Form Validation and Disabling Browser Caching. Now lets start:

 
How to Do Form Validation

If you have ever placed a form on your website before, you will probably have received the results of submissions that were incomplete in some way. For example, the visitor submitting the form may have completely omitted his email

Read the rest of this entry »



© 2008 HeyGB.com