Category Archives: PHP

How to get database backup in your mailbox daily automatically

get database backup in your mailbox daily automatically

Few web host do not offer a daily backup of MySQL database while few offer extra charge for automatic backup.This PHP script will help you to get database backup in your mailbox daily automatically. This script  performs three tasks.First it creates backup of MySQL database and save it server in .sql format.In second step it compress the .sql file and convert ... Read More »

How to Schedule a Task in PHP with Cron Jobs

How to Schedule a Task in PHP with Cron Jobs

Cron Jobs run scheduled tasks at specific times. This is good to set up automated maintenance and other unmanned server duties.Unfortunately PHP does not provide any facility to run any script at any specified time or any specific interval.That’s why you need to  know how to schedule a task in PHP with Cron Jobs. There are mainly two methods to  schedule ... Read More »

Creating 5 Star Rating System with PHP , MySQL ,Jquery and Ajax

Rating system is very useful to know what a user is liking most.In this tutorial you will learn about creating 5 Star Rating System with PHP,MySQL ,Jquery and Ajax.This tutorial also reduce chances of multiple votes by single user for same product.To prevent  multiple votes it will store user’s IP address and also set a cookie in user’s browser .It ... Read More »

How to secure PHP websites from hackers

Security is an often overlooked part of PHP programming.It is almost impossible to make your website 100% secure but there are few things you must follow  to secure PHP websites from hackers.Here is the few tips which must be follow by developers to secure PHP websites from hackers. 1.Never Execute Unescaped Queries(Protection against SQL Injection)-SQL Injection is the most well knowledge ... Read More »

Creating a file upload form with PHP

This tutorial will guide you for creating a file upload form with PHP.You may need file upload facility on your website for uploading avatars etc.In my example i have coded the script only for images you can customize this script according to your need. So here is the step by step guide for  creating a file upload form with PHP– ... Read More »

Add captcha to your form using PHP step by step

Captcha is very popular method to prevent automated software from performing actions which degrade the quality of service of a given system .You can add captcha to your form using php by following these steps- 1.Generate a random image to add captcha to your form using PHP- In this step we are going to code a program which will generate an ... Read More »

How to write text on an image in php

To write text on an image in php you need to make sure that your PHP interpreter must have been compiled with the GD library and True Type Font support(if you want to use True Type Fonts for writing text) compiled into it as well. Follow these steps to write text on an image using PHP- 1.Load the image-PHP has three library ... Read More »

Download a remote file with php

There are many methods in PHP to download the remote file.I am going to explain few methods which are the best and easy to implement. 1-Using CURL(Client URL):- Curl is the best method to download a remote file because curl provides many  options to handle your download.Here is the few things which makes it the best. You can send and ... Read More »

Autocomplete an input field using AJAX, PHP, MySQL and JQuery

When you are using a web form you may need to generate suggestions for users to select an option from all available options.In my example , I have assumed that i have an  input field called country.When a user types few text the webpage sends an ajax request shows the names of the countries which match with the user’s input.If ... Read More »

Using post method in ajax without Jquery

In most of the cases GET method is used for sending the ajax request but due to limitation of GET method like 1000 character limit we need to use POST method in AJAX. Follow these step to send an AJAX request using POST methode- 1-Create an XMLHttpRequest- Mozila Frefox ,Safari Chrome and IE 6+ support XMLHttpRequest but older version of Internet ... Read More »