Announcement

Collapse
No announcement yet.

Time Taken To Load A Page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GamerZ
    replied
    Originally posted by Steviepowers
    thats a cool, script, I just tested it on my site, and according to it, it loads up the forum home in 0.005812 seconds
    ya mine abt teh same

    Leave a comment:


  • Steviepowers
    replied
    thats a cool, script, I just tested it on my site, and according to it, it loads up the forum home in 0.005812 seconds

    Leave a comment:


  • GamerZ
    replied
    the above code can worked only if the whole page is script in php even html tages must use print or echo.

    What about this code.
    PHP Code:
    $mtime microtime();
    $endtime $mtime;
    $totaltime = ($endtime $starttime);
    printf('<div align="center">PHP Processes This Page In %f seconds.</div>'$mtime); 
    it works, but i dunno whether is it the real processing time. I am quite new to these php programming, pardon me for my mistakes.

    Thanks
    Last edited by GamerZ; Mon 24 Sep '01, 5:37pm.

    Leave a comment:


  • Chen
    replied
    I took this right from vB, so it should work.

    Add this right after <?php in the file, like this:
    PHP Code:
    <?php
    $pagestarttime
    =microtime();
    Now add this right before ?>, like this:
    PHP Code:
    $pageendtime=microtime();
    $starttime=explode(" ",$pagestarttime);
    $endtime=explode(" ",$pageendtime);
    $totaltime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1];
    ?> 
    Now use $totaltime.

    Leave a comment:


  • GamerZ
    started a topic Time Taken To Load A Page

    Time Taken To Load A Page

    How to do in php the time take to load a page, like for example

    php process this page in $time seconds


    Pleas Help Thanks
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X