WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Script loading time
Categories : PHP, Beginner Guides, Date Time Click here to Update Your Picture
leaping langoor
Date : Aug 22nd 2004
Grade : 2 of 5 (graded 4 times)
Viewed : 5889
File : No file for this code example.
Images : No Images for this code example.
Search : More code by leaping langoor
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

You can always see the "Loading time:..." in many web sites. Well this is a simple way on how to do it:
<?php
// Get Current Time
$mtime = microtime();
// Split Seconds and Microseconds
$mtime = explode (" ", $mtime);
// Create a single value for start time
$mtime = $mtime[1] + $mtime[0];
// Write Start Time Into A Variable
$tstart = $mtime;

// Get current time (Like above) to get end time
$mtime = microtime();
$mtime = explode (" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
// Store end time in a variable
$tend = $mtime;
// Calculate Difference
$totaltime = ($tend - $tstart);
// Output the result
printf ("This page was generated in %f seconds.", $totaltime);
?>



Kewl Date Example
Categories : PHP, HTML and PHP, Date Time, CSS, Beginner Guides
Local Time clock and Server time usign PHP and JavaScript
Categories : PHP, Java Script, Date Time, Beginner Guides
Find the day of the week for any given year/month/day.
Categories : PHP, Date Time, Data Validation, Algorithms, Beginner Guides
Change the background color of a website daily dynamically using the php date function to get the current day of the week and depending on that day, set the background color for the web page.
Categories : PHP, Date Time, Beginner Guides, Web Design
Find if a year is leap.
Categories : PHP, Date Time, Beginner Guides, Data Validation
How to Insert a Date Format Into MySQL from PHP
Categories : PHP, Databases, MySQL, Date Time, Beginner Guides
Basic Authentication with sessions
Categories : PHP, Beginner Guides, Authentication, Form Processing, Sessions
Introduction to Language Files
Categories : PHP, Filesystem, Beginner Guides
News management class
Categories : PHP, PHP Classes, Beginner Guides
A Timing Class
Categories : PHP, PHP Classes, Date Time
Select with current month
Categories : PHP, HTML and PHP, Date Time, Arrays
Finding the day of the week for a specific date.
Categories : PHP, Databases, MySQL, Date Time
Different Call User Functions
Categories : PHP, Functions, Beginner Guides
A wrapper function to format dates coming from a databases with the same syntax as PHP's date() function.
Categories : Date Time, Databases, PHP
pcCalendar class - Allows for the creation of calendars in HTML pages. All output functions can be easily overridden, refer to article 1471 for an example.
Categories : PHP, Date Time, Calendar, PHP Classes