small,script,will,output,much,time,seconds,to
Quick Search for:  in language:    
small,script,will,output,much,time,seconds,to
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
PHP Stats

 Code: 74,754 lines
 Jobs: 12 postings

 
Sponsored by:

 

You are in:

 
Login



Latest Code Ticker for PHP.
Smart Image Navigator
By Brian Di Croce on 10/27


Click here to see a screenshot of this code!Form security verification
By Christian Mallette on 10/26

(Screen Shot)

Click here to see a screenshot of this code!Guestbook
By Nightmare on 10/25

(Screen Shot)

Shout! Box
By Nightmare on 10/23


SERVER-TO-SERVE R site (or single dir) transfer
By Raffaele Marranzini on 10/22


Site IP Logger - Watch who comes to your site!
By KRaZY-DeSiGN on 10/21


IP Banner - Block unwanted people from your site!
By KRaZY-DeSiGN on 10/20


PWGen
By Flinn Mueller on 10/19


URHere
By Flinn Mueller on 10/19


Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

Page Load Time

Print
Email
 

Submitted on: 6/25/2002 1:45:26 PM
By: Steve Gricci  
Level: Beginner
User Rating: By 7 Users
Compatibility:PHP 3.0, PHP 4.0

Users have accessed this article 4371 times.
 
(About the author)
 
     This small script will let you output how much time (in seconds) it took for the page to expell. i.e. 0.501 seconds

 
 
Terms of Agreement:   
By using this article, you agree to the following terms...   
1) You may use this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this article from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
/*
*@author steve gricci
*@access public
*@skill beginner
*@site www.deepcode.net
*/

//put at begining of file

function utime (){
$time = explode( " ", microtime());
$usec = (double)$time[0];
$sec = (double)$time[1];
return $sec + $usec;
}
$start = utime();

//put at end of page before /body and /h // tml tags

$end = utime(); $run = $end - $start; echo "Page expelled in " . substr($run, 0, 5) . " secs.";
//Nothing after this


Other 1 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this article(in the Beginner category)?
(The article with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
6/30/2002 12:39:11 AM:Steve Gricci
if anyone wouldn't mind, please vote on this code for me :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
7/3/2002 9:12:08 AM:Sue
Great code. small and to the point. Just what I was looking for. Thanks.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/1/2002 12:27:46 PM:Derrick Simpson
Well, It does a great job of telling how long the server took to process the php, but that has nothing to do with browser rendering time or bandwidth. In fact, you should get almost the very same number regardless of the browser. The PHP Hypertext Preprocessor generates the html and then the browser loads the page.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
9/21/2002 11:54:01 PM:
I agree with Derrick, it had nothing to do with the browser loading time.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this article has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular article, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | PHP Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.