Personal Web Space usage meter
Personal Web Space usage meter
I have 200 MB quota allocated for my personal web space. Is there a way to tell how much of this quota has been used in MyExetel?
Re: Personal Web Space usage meter
Currently there is no such option for the free web space (home.exetel.com.au ) facility in MyExetel.
However, the facility may available in future with our scheduled plan developments, and current we cannot confirm with an estimated time frame.
-
- Posts: 52
- Joined: Fri Sep 23, 2005 10:36 am
Re: Personal Web Space usage meter
Hi Steve Bow,
Place this little php routine on your index page. If you want to see how it works go to http://home.exetel.com.au/pushbike/ and to the link Space at the bottom of the page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>webspace size</title>
</head>
<body background="#FFF">
<?php
// function du written by Gregor Mosheh on 17-Jul-2003 03:25
// version 1.01 written by psylogic
// just run this script and it will return the current size of your webspace in bytes
function du($location) {
if (!$location or !is_dir($location)) {
return 0;
}
$total = 0;
$all = opendir($location);
while ($file = readdir($all)) {
if (is_dir($location.'/'.$file) and $file <> ".." and $file <> ".") {
$total += du($location.'/'.$file);
unset($file);
}
elseif (!is_dir($location.'/'.$file)) {
$stats = stat($location.'/'.$file);
$total += $stats['size'];
unset($file);
}
}
closedir($all);
unset($all);
return $total;
}
?>
<div style="background-color:#ccc;">
<?php
print du(getcwd());
?>
<br />
<br />
<?php
print getcwd();
?>
<br />
</div>
</body>
</html>
Place this little php routine on your index page. If you want to see how it works go to http://home.exetel.com.au/pushbike/ and to the link Space at the bottom of the page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>webspace size</title>
</head>
<body background="#FFF">
<?php
// function du written by Gregor Mosheh on 17-Jul-2003 03:25
// version 1.01 written by psylogic
// just run this script and it will return the current size of your webspace in bytes
function du($location) {
if (!$location or !is_dir($location)) {
return 0;
}
$total = 0;
$all = opendir($location);
while ($file = readdir($all)) {
if (is_dir($location.'/'.$file) and $file <> ".." and $file <> ".") {
$total += du($location.'/'.$file);
unset($file);
}
elseif (!is_dir($location.'/'.$file)) {
$stats = stat($location.'/'.$file);
$total += $stats['size'];
unset($file);
}
}
closedir($all);
unset($all);
return $total;
}
?>
<div style="background-color:#ccc;">
<?php
print du(getcwd());
?>
<br />
<br />
<?php
print getcwd();
?>
<br />
</div>
</body>
</html>