Jump to content
xisto Community
Sign in to follow this  
Mike

About Cragllo's Script Time File. Located on support.trap17.com

Recommended Posts

It's incorrect.. It gives you a HUGE number with E-5 or something at the end.

Just do this for your file:

<?php// At the very top of the document!$start_time = microtime();// ...// ...// At the very BOTTOM of the document$end_time = microtime();// Footerfunction footer() {print 'Copyright ©2005 - YOURNAME<br />Script executed in '.round($end_time-$start_time,5).' seconds.';}

Share this post


Link to post
Share on other sites

yes. something which just takes up your users time to load.. F that script.. it's stupid.

Share this post


Link to post
Share on other sites

ill, if you think that two-line code that I just posted wastes the users time, then you shouldn't be in the PHP forum because you obviously lack the knowledge of it. It takes no time at all, it shows the time that it takes for the script to execute.

Share this post


Link to post
Share on other sites

it really has no big effect at all. i mean being slowed down for seconds. at least a fraction of a second ain't bad. coz php scripts, especially those that are really short are parsed fast.

Share this post


Link to post
Share on other sites

No offense intended to Cragllo, but none of the scripts provided in the said area are of particularly high quality.In my opinion, displaying script execution time should be left for benchmarking and testing purposes only; in all seriousness, no one really cares that it took 0.003 seconds for your page to load.

Share this post


Link to post
Share on other sites

Well cragllo, it is true that the script has to execute but it's just recording the loading time, which basically takes no time at all. Here is a better script thing (again):

// At the top of the page $start = array_sum(explode(' ',microtime()));// At the bottom of the page$end = array_sum(explode(' ',microtime()));$domath = $end-$start;$calc = round($domath,5);echo 'Executed in <b>'.$calc.'</b> seconds';


Of course, like Spectre said.. Not everybody cares how long it takes for the page to load. But I actually find it kinda interesting, and it lets you know ahead of time is somebody is trying to DDoS you. >_>

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.