PHP Web Development Tutorials

PHP Web Development Tutorials and Articles
  Title / Author Reverse Sort Order Replies
Views
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,697
Show page processing time at the end of the page using PHP <?php //Page process time calculation /* The microtime() function fetches the current current Unix timestamp with microseconds another alternative method is to use the microtime() so that it returns a float value...
1
14,901
Haversine Formula The haversine formula is an equation important in navigation, giving great-circle distances between two points on a sphere from their longitudes and latitudes. It is a special case of a more general formula in spherical trigonometry, the law of haversines, relating the sides...
0
17,773
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,622
With an ODBC connection, you can connect to any database, on any computer in your network, as long as an ODBC connection is available. Here is how to create an ODBC connection to a MS Access Database: 1.Open the Administrative Tools icon in your Control Panel. 2.Double-click...
0
18,798
All PHP coders are aware of the mail() function in PHP, which can be used to send mails. On Linux systems we ussually have Sendmail program installed, if someone is facing a problem sending mails with mail() function, they can alternatively use Sendmail to send mails. For sending mails using...
4
34,642
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,314
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,810
How to optimize your PHP installation to handle large file uploads. Though PHP presents a very versatile and user friendly interface for handling file uploads, the default installation is not geared for working with files in excess of 2 Mega Bytes. This article will help you...
0
7,863
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,636
There are times when we require to put a calendar in some web appplication of ours,writing the code to generate a calendar from scratch is painstaking and waste of time. So PEAR comes to rescue with its Calendar package. The package gives a ton of features, below you'll find a simple program to...
0
6,979
The PHP Extension and Application Repository (PEAR) is an open source structured library of packages for PHP developers. These packages provide routines which solve problems PHP developers regularly face: sending structured e-mail (such as an HTML attachment), interacting with different databases...
0
9,721
Manier times we require to create logs of various activities/errors in our web applications, so here we'll look into how to achieve that. Logging data to a file in PHP can be as simple or as complex as you want to make it. Break it down, though, and it all comes down to these three simple lines...
0
16,488
At some point, most developers have a need to create graphs. I've known some to get frustrated and end up exporting the data to a spreadsheet, rather than relying upon the graphing capabilities of Open Office or Excel. That can be the way to go in certain cases, but not because there's no...
1
12,581
Do a WHOIS query for any domain using the script below.:) <form method="POST" action= "<?$_SERVER?>"> <label>Do a WHOIS query:</label> <P> <INPUT name="domain" SIZE="20" MAXLENGTH="22"> <INPUT TYPE="SUBMIT" VALUE="Check name"> <INPUT TYPE="RESET" VALUE="Clear"> </P> </FORM>
2
7,242
Many times we require to format a number to output with thousand place comma separator, here is a function will help you do so. function numcomma ($value) { if(strpos($value,".")) { $decimalval = substr($value,strpos($value,".")+1); $value =...
0
2,280
Shell Sort function in PHP <? function shellsort($elements,$length) { $k=0; $gap=(int) ($length / 2); while($gap>1) { $k++;
0
6,079
Here's a function which will format the passed bytes into KB,MB,GB...appropriately. function GetSize ($sizeb) { $sizekb = $sizeb / 1024; $sizemb = $sizekb / 1024; $sizegb = $sizemb / 1024; $sizetb = $sizegb / 1024; $sizepb = $sizetb / 1024; if ($sizeb > 1) {$size =...
0
2,436
Introduction Suppose you want to know the age of a person given her birth date. Letís say her birth date is "09-23-1969". Although in this case you might say that we donít need a program to compute the age, but assuming there are 1000s of records in your database and for every person you have to...
0
65,187
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. ...
0
17,514