Archive for the 'Tutorial – PHP' Category

How do I change timezone for PHP?

Posted on October 25 2009 by zemog

There are at least 2 ways to cause PHP to behave as if it was in the timezone of your choice. 1. Follow this other FAQ to change timezone for your entire account. 2. If you only want particular PHP scripts (and not shell or other cgi scripts) to use a specific timezone, set the [...]

How to setup cron

Posted on October 25 2009 by zemog

I remember few years back when I made a script that should run everyday. I did not know cron that time. What I did was put that script in the home page hoping that in a day one person will open the site so that the script will be triggered. What a lousy idea!

How to use Cookies in PHP

Posted on October 18 2009 by zemog

Cookies are pieces of data that are stored as simple little text files in the site visitor’s computer, and allow the site server to keep track of what a visitor is doing during their visit. To know how to implement cookie, read on!

Using Sessions in PHP

Posted on October 18 2009 by zemog

This tutorial will teach you the basics of PHP sessions. Through the discussion you will learn how simple and easy it is to implement session.

Simple AJAX with PHP

Posted on October 18 2009 by zemog

What is AJAX and what does it gives you? Before we will tackle on the implementation of AJAX, let us define it. AJAX is a shorthand for asynchronous JavaScript and XML.

Securing PHPMyAdmin

Posted on October 18 2009 by zemog

Have you tried securing your phpmyadmin from prying eyes? Is your phpmyadmin so vulnerable that anybody can get inside and do whatever they like? Read here to know how you can be safe.

Resizing image in PHP

Posted on October 17 2009 by zemog

Resizing an image during upload is a common feature on social networking sites or any applications with personal profiling. Php has all the necessary functions to do this with ease. Read along and you will find how.

Sending email using PHP

Posted on October 1 2009 by zemog

How are you going to make your own contact us? Send email

Using Recaptcha to your registration form

Posted on September 29 2009 by zemog

Have you seen website registration page lately? See that image where there are texts, words, alphanumeric or phrase that you need to type? That is what we called CAPTCHA (Completely Automated Public Turing test to tell Computers and Humans Apart). Before, if you want to incorporate captcha into your page, you have to make some [...]

How to create a registration page using PHP

Posted on February 12 2009 by zemog

Ever wonder how could you create a registration page for you website? If you have a website and you want your visitors to register for your mailing list for example, this tutorial is for you. In this exercise we will create three files. Registration form, configuration file and a form to transact the information. Registration [...]

Error reporting in PHP

Posted on November 12 2008 by zemog

Error reporting is a good thing, right? It gives you valuable insight into why your application failed. It gives you useful information such as what happened and where it happened. This information is essential in order to fix the bug. However, you might not be the only one who is interested in knowing why your application failed. By giving the user the details from the errors and/or exceptions thrown by PHP you are giving valuable insight into how your application works. Apart from the source itself, this is one of the most valuable intelligence the attacker might gather when looking for vulnerabilities in your application.