PHP Web Development Tutorials

PHP Web Development Tutorials and Articles
  Title / Author Replies
Views Reverse Sort Order
Repetitive tasks are always a burden to us. Deleting spam email, sealing 50 envelopes, and going to work are all examples of tasks that are repeated. The nice thing about programming is that you can avoid such repetitive tasks with a little bit of extra thinking. Most often these repetitive tasks...
6
5,918
What is MAIL4EVERY1? After long time, I got this very unusual idea to make something useful :D Basically I got fed up with my web host not allowing mail() feature and so MAIL4EVERY1. Mail4Every1 is a simple script that would allow any one to send emails even if the webhost allows the mail() or...
11
5,764
Many sites send you a temporary password after u sign up with them. Here is is how you too can do that function TempPassword($tp_len) { $pstring = "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWXxYyZz0123456789"; $plen = strlen($pstring); for ($i = 1; $i <= $tp_len; $i++) ...
1
5,744
Bubble sort in this form allows someone to order number arrays from lowest number to highest number and vice verse. This article serves the purpose of providing the bubble sort algorithm for use in php. I found a tuts @ active.tutsplus and I used it as a base to create a direct port over to php. ...
5
5,722
password.class.php <?php /* * Simple password generator define ('PC_MINUS', 0x01); define ('PC_CAPITAL', 0x02); define ('PC_NUMBERS', 0x04); define ('PC_SPACES', 0x08);
5
5,624
Introduction Actually, this has been taken from my blog(www.sampctricks.blogspot.com) and I re-updated the article for Go4expert. I am myself newbie to programming but still I have included here what I myself practice. This is just a basic guide to prevent basic flaws in your PHP based web apps....
5
5,488
I like coding PHP, in Perl we can change an associative array to a list then to a string. In case if we wish to do the same in PHP, we need to write some user functions for that purpose. Here are two functions which will convert Array to String and vice-versa. //array to string ...
0
5,365
Sometimes we need to find the number of items, located inside an array.Let's take this array as example, $a=1; $a=3; $a=4; $a=5; here the total item count is 4, but when you use count() function you get 3. So I wrote a small function which counts array elements, even recursively. ...
0
5,150
Cookies are basically small files which are stored in User’s Computer. Their main purpose is to hold data specific to a particular client and Website, They can only be accessed either by Web Server or the client computer. This allows the server to access user specific data while saving space on the...
7
4,900
This script is a simple file based counter. This is meant for sites that do not run a db and instead, use a file and a cookie. It isn't the best I've seen but it's simple. Consider this as a tutorial. Just create a file called counter.txt and put this where you want to display the...
0
4,856
The code snippet below will pick up a random image from the server and sends it to the browser. Try it out. <?php if($_GET){ $folder=$_GET; }else{ $folder='/images/'; } //path to image dir
2
4,798
Well, I always had a problem identifying my MP3 files because of their vague filenames like, "Track 1.mp3" or "Bryan Adams 1.mp3", I was wondering whether I could rename the file depending upon the MP3 tags, so I came with up this script with reads MP3 tags and renames the file according to the...
0
4,765
Building web applications with membership management is one of the most frequent tasks that every programmer does. Managing membership data, such as username, password and the member's profile with sessions in PHP is the easiest and simplest solution. Sessions stores data about a particular...
2
4,680
Background I've needed the header function in php so many times I figured I'd write a tutorial on it. This tutorial should help you do most of the things that the header function is capable of. Simply put, the php header function will send a http header to the browser. Headers in PHP If...
4
4,431
This time I took a bit of a change from the usual subjects I write, not a big change though. The reason for writing this set of articles (More to come and there's another beginners one as well) is because I felt that there isn't a proper or complete guide written for the pure beginners to start...
0
4,412
Introduction RSS is a family of web feed formats used to publish frequently updated content such as blog entries, news headlines or podcasts. An RSS document, which is called a "feed," "web feed," or "channel," contains either a summary of content from an associated web site or the full text....
2
4,346
How to show the no. of users online on your site using PHP & MySQL. Step1: Creating the database Create a new table called 'useronline', with 3 fields inside a table. The fields are timestamp, ip and file. Below is the SQL to create the table. CREATE TABLE useronline ( timestamp...
1
4,094
PHPExcel project provides a set of classes, which allow us to Read, Write and Create Excel documents in PHP. File formats, supported by PHPExcel are .xls, .xlsx, CSV, .ods, Gnumeric, PDF and HTML. Requirements for PHPExcel: PHP version >= 5.2.0 PHP extensions php_zip,php_xml,php_gd2...
0
4,059
Many times its required that we truncate a long string and add ellipsis to the end of the truncated string. Here's a function which does exactly that. function truncate( $varb, $num ) { $dnum = intval($num); if (strlen($varb)>$dnum) { $nvarb = substr($varb, 0,...
0
4,053
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,...
4
3,933