FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Need PHP Code





dxhunter
Hello All I need sample code but i cant find Sample say
"This Page Opening (Or loading) 0.353 Second"
any body help me Sad Sad Sad
JustaMin
Add this to the very start of your page:

Code:

    $mtime = microtime();
    $mtime = explode(" ",$mtime);
    $mtime = $mtime[1] + $mtime[0];
    $tstart = $mtime;


and this to the very end:

Code:

    $mtime = microtime();
    $mtime = explode(" ",$mtime);
    $mtime = $mtime[1] + $mtime[0];
    $tend = $mtime;
    $totaltime = ($tend - $tstart);
//Output result
    printf ("Page was generated in %f seconds !", $totaltime);


Smile

You could also make this into a couple of functions if you're going to use it in more than one place
dxhunter
JustaMin Many thanks it is working well Smile
benjamincblunt
Why did you want/need this code in the first place? Are you trying to make another search engine?
Related topics
Show PHP Code
Php Code Trouble Set-up
Simple PHP forum code needed!
PHP include code problem
PHP CODE INCLUSION
mySQL Query/PHP code - get the highest value...
my PHP code benchmark script that got some problems
PHP code snippit?
CSS for making images go through a php code.
Gradient Fill Cell
What is a good or bad php code?
I want PHP Code to ......
Help With Simple PHP Code Snipit
removing DirectAdmin part of URL makes php code work
Highlight PHP-code in a HTML-document
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.