Skip to forum content
Code The World
We are a group of graphic designers and web developers trying to create a social network for the people, and not for the commercialization of said social network.
You are not logged in. Please login or register.
Pages 1
You must login or register to post a reply
- Registered: 2007-11-19
- Posts: 12
Topic: Page load time
Description
Outputs the time in seconds that it takes for a PHP page to load.
The code
<?php
// Insert this block of code at the very top of your page:
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$start = $time;
// Place this part at the very end of your page
$time = microtime();
$time = explode(" ", $time);
$time = $time[1] + $time[0];
$finish = $time;
$totaltime = ($finish - $start);
printf ("This page took %f seconds to load.", $totaltime);
?>
Posts: 1
Pages 1
You must login or register to post a reply
Powered by PunBB, supported by Informer Technologies, Inc.
Currently used extensions: pun_admin_manage_extensions_improved, pun_poll, pun_quote, pun_bbcode, pun_repository, pun_tags, pun_admin_add_user, google_analytics, pun_eggdrop, pun_recaptcha.
Copyright © 2007 - 2025 CodeTheWorld