If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
source code script for 'page created' in __ seconds ?  XML
Forum Index » General Discussion
Author Message
Anonymous



I was wondering if you wouldn't mind sharing the source code on how to display the "page created" / "page processed" time on the bottom of every page? I think it's a very cool feature, but have been pulling my hair out trying to code it myself....any help/advice/resources is greatly appreciated!
Webmaster
Site Admin
[Avatar]

Joined: 10/01/2002 23:32:17
Messages: 82
Offline

  1. <?php  
  2. $mtime = microtime();  
  3. $mtime = explode(" ",$mtime);  
  4. $mtime = $mtime[1] + $mtime[0];  
  5. $starttime = $mtime;  
  6. ?>  


<html>
your page
</html>

  1. <?php  
  2. $mtime = microtime();  
  3. $mtime = explode(" ",$mtime);  
  4. $mtime = $mtime[1] + $mtime[0];  
  5. $endtime = $mtime;  
  6. $totaltime = ($endtime - $starttime);  
  7. printf("<center><font size=\"1\" face=\"Arial\" color=\"#CACACA\">Created in %f seconds.</font></center>", $totaltime);  
  8. ?>  
[Email] [WWW]
Anonymous



Most excellent! Thank you for taking the time to post that script. It has since made my day! -- oh, what a life I live, oh well
 
Forum Index » General Discussion
Go to:   
Based on the open source JForum