1. <?php
2.
3. class suresayac
4. {
5. function baslat()
6. {
7. global $baslangic;
8. $msure = microtime ();
9. $msure = explode (' ', $msure );
10. $msure = $msure[1] + $msure[0];
11. $baslangic = $msure;
12. }
13. function bitir()
14. {
15. global $baslangic;
16. $msure = microtime ();
17. $msure = explode (' ', $msure);
18. $msure = $msure[1] + $msure[0];
19. $bitis = $msure;
20. $toplam = round (($bitis - $baslangic), 5);
21. return $toplam;
22. }
23. }
24.
25.
26.
27.
28. //Kullanim
29.
30. $sure = new suresayac;
31. $sure->baslat();
32.
33.
34. //Sayfa iceriginiz buraya...
35.
36. echo "<p>Sayfa yüklenme süresi: ". $sure->bitir()
37. ." saniye</p>";
38.
39. ?>
ßurack
burakcemuruk@hotmail.com