Current location: Hot Scripts Forums » Programming Languages » PHP » page load time display


page load time display

Reply
  #1 (permalink)  
Old 03-10-04, 10:26 PM
epic1231 epic1231 is offline
Newbie Coder
 
Join Date: Sep 2003
Location: NJ
Posts: 80
Thanks: 0
Thanked 1 Time in 1 Post
Question page load time display

hey all i am looking to figure out what is the best way to add a page load time into my page - the page is a HTML page and i can't find any pre-made scripts or anything to plug-in

Does anyone know of any or where i can find some - tried searches on google and hotscripts to no avail

Something similiar to "this page loaded in 0.09495 seconds"

Thanks in advance,
Bill
Reply With Quote
  #2 (permalink)  
Old 03-10-04, 11:21 PM
Infinite_Hackers's Avatar
Infinite_Hackers Infinite_Hackers is offline
Coding Addict
 
Join Date: Dec 2003
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Wink

PHP Code:

//

// Page generation time
// By: GFX-PRO.ATH.CX
// Site: [url]http://gfx-pro.ath.cx[/url]
//
    
$mtime microtime();
    
$mtime explode(" ",$mtime);
    
$mtime $mtime[0];
    
$endtime $mtime;

    
$gentime round(($endtime $starttime), 3);

       echo 
'Processing took approximately '$gentime .' seconds'
you may simple edit the
PHP Code:

$gentime round(($endtime $starttime), 3); 

by changing the 3 to 4, 5 and etc to tell how many numbers to display (at the moment it will be something like 0.423)

Last edited by Infinite_Hackers; 03-10-04 at 11:25 PM.
Reply With Quote
  #3 (permalink)  
Old 03-10-04, 11:33 PM
epic1231 epic1231 is offline
Newbie Coder
 
Join Date: Sep 2003
Location: NJ
Posts: 80
Thanks: 0
Thanked 1 Time in 1 Post
thank you - works well
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically refresh page after page load failure jdugger JavaScript 3 08-05-10 09:16 AM
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
results page to display prev/next php-learner PHP 11 01-12-04 09:40 AM
Classified Ads skipper23 Perl 2 12-30-03 03:43 AM
Create a next page link when there are too many records to be display in a webpage Han84 ASP 0 10-19-03 10:32 PM


All times are GMT -5. The time now is 10:19 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.