PHP Web Development Tutorials

PHP Web Development Tutorials and Articles
  Title / Author Replies
PHP can be used for a lot of different things, and is one of the most powerful scripting languages available on the web. Not to mention it's extremely cheap and widely used. However, one thing that PHP is lacking, and in fact most scripting languages are, is a way to update pages in real-time,...
Many websites generate temporary password or some generate the Activiation code for verification of email. They send the mail with that code in it and so If you wonder how they do this here is a function to do this. Input : - Length of the Random string you wish to generate Output :- Random...
If we intend to make an image gallery, and we would like to show the thumbails of the images, it wouldn't be a wise idea to show the original images with their height & width modified in the <img> tag, that would result in low image quality & higher download time. The solution to this problem would...
PHP will automatically convert data types as necessary across the board - you need not worry about it happening. If you specifically wish to override PHP's type conversion, you can perform what is called a type cast - you forcibly convert a variable of type A to type B. In PHP, type casting looks...
Some web applications need to display numbers in words, like e-commerce, shopping web applications, so PEAR brings a package named Numbers_Words which converts numbers to words in 2 lines of PHP code. Checkout the example below. <?php require('Numbers/Words.php'); $number =...
If you have PHP4 working on your server, and have heard that PHP5 may screw up things. Here's how to have both running alongside. #!/bin/sh # PHP5 CGI Installer for cPanel/WHM Servers VERSION=5.0.4 cd /usr/src wget -O php.tbz2...
Morse code is a method for transmitting information, using standardized sequences of short and long elements, for the letters, numerals, punctuation and special characters of a message. The short and long elements can be formed by sounds, marks or pulses, and are commonly known as "dots" and...
All like to create PHP scripts as fast as possible, and we try to take any shortcuts that we have. Here are few tips to speed up php code Tip -1 Using a good editor can really save you time. If you're still stuck on using Notepad to edit your PHP scripts, switch right now. There are...
This is a guide, you will not have a stand-alone effect or file by the end of this guide, but you will - hopefully - have an understanding of the Unix timestamp that allows you a powerful form of managing your PHP applications. Note: This guide expects the reader to have an understanding on how...
Exceptions are used to change the normal flow of a script if a specified error occurs.Exception handling is used to change the normal flow of the code execution if a specified error (exceptional) condition occurs. This condition is called an exception.when an exception is triggered the current code...
When it becomes necessary to compare two or more text files in UNIX, most developers reach for the diff program. This program, included by default in almost all UNIX distributions, compares the files line by line and displays the changes between them in a number of different output formats. ...
PHP is arguably the most popular scripting language for Web sites. This popularity comes with a price, however, and that is increased attention to various vulnerabilities in PHP itself and in the plethora of Web applications written in PHP. The security features built into PHP are weak, and the...
Introduction ROT13 ("rotate by 13 places", sometimes hyphenated ROT-13) is a simple Caesar cipher used in online forums as a means of hiding spoilers, punchlines, puzzle solutions, and offensive materials from the casual glance. ROT13 has been described as the "Usenet equivalent of a...
password.class.php <?php /* * Simple password generator define ('PC_MINUS', 0x01); define ('PC_CAPITAL', 0x02); define ('PC_NUMBERS', 0x04); define ('PC_SPACES', 0x08);
This is temperature conversion script, used to convert temperature from Celsius, Fahrenheit, Rankine, and Kelvin. The Code Include the script in your php project and call one of the conversion functions with a numeric value as its parameter to get some output. You can convert from Celsius,...
This script adds some basic math functions to php allowing you to get percentages, ratios and other fraction based functions. Background I created this because I had a need for some math functions that php does not provide. I also made them for my math class to save on time from having to do...