Function to rotate image in PHP

GD library in PHP is very useful for image processing and you can do a lot image manipulation from it. In this post, I’ll show you a simple Image manipulation (image rotation)using the function provided below in PHP. You’ll see how easy it is to rotate an image using PHP.

Default arguments in the functions of PHP

If you are unaware of default argument in function then you should know that you candefine the function with default arguments in PHP as you can do it C and C++. Providing default arguments in the function can be very useful when you’ve to extend the the functionality of the previously written functions.

7 Useful functions to tighten the security in PHP

Security is a very important aspect of programming. In PHP, there are few useful functions which is very handy for preventing your website from various attacks like SQL Injection Attack , XSS attack etc.Let’s check few useful functions available in PHP to tighten the security in your project. But note that this is not a complete list, it just list of functions which I found useful for using in your project.

Some unusual comparison operations in PHP

Today I was working for a project and a weired comparison operation in PHP got my brain out for 2 hour and after searching in google I could able to figure out the problem and I’m posting here so that you guys who are unaware of this kind of comparison will not suffer in future. First let’s see two examples the unusual comparison in PHP.

8 useful server variables available in PHP

You guys must have know about server variables in PHP. Server Variables are those variables which are inside the super global array named $_SERVER available in PHP. There are many server variables in PHP and some of them are very useful for fore developing PHP projects. I’m going to post here some of the very useful server variables available in PHP development.

Date format validation in PHP

Today Sushil asked me how can we validate the date which is entered from textbox in “YYYY-MM-DD” format. Well, we can validate the format of the date using regular expression but how to validate weather that date is valid date or not, such as “2007-02-29″ is the correct format of the date but it’s not the valid date.

Solving time difference between hosting server and local timezone in PHP

I think this is one of the common problem you’ll face while you’re working for the website of a particular country and web server is located in another different country. If client have the dedicated server then you won’t face this problem. But if you just own a single account of that server then you’ll most probably face this problem of synchronizing the time difference of server time and local time.

Email address validation in PHP

Well you’ve been asking why this person has posted the same stuff which you can find easily in google. Ya you are right you can get lots of scripts but many of them are not useful for me so far. They just validate the email like “info@yahoo.com” but they didn’t validate the email address like “contact@roshanbh.com.np” or even the address like “info@holmesglen.vic.edu.au“.