Write your "How To" regarding anything you are comfortable with and you feel it will help the forum members.
NOTE :: All threads started here will appear only after the approval from Administrator
gamez93
Posts: 58 Joined: Wed Feb 21, 2007 2:14 pm
Post
by gamez93 » Thu Apr 26, 2007 5:48 pm
You wanna know how much time it takes for your page to load?
It's easy!! First, insert this php code at the very top of your page:
Code: Select all
Code:
1 <?php
2 ereg("(\.[0-9]+) ([0-9]+)",microtime(),$time);
3 $starttime = doubleval($time[1])+doubleval($time[2]);
4 ?>
Then insert this one at the end of your page:
Code: Select all
Code:
1 <?php
2 ereg("(\.[0-9]*) ([0-9]*)",microtime(),$time);
3 $endtime=doubleval($time[1])+doubleval($time[2]);
4 $runtime = number_format($endtime-$starttime,4)." Seconds";
5 echo "Page loaded at: $runtime.";
6 ?>
SHAdmin
Posts: 2089 Joined: Sat Dec 18, 2004 11:28 am
Contact:
Post
by SHAdmin » Tue May 01, 2007 5:22 pm
Your 'How To' has been approved and you have been credited 20 points for sharing it.