|
Author |
Message |
Daniel
Team Member
![](images/rank_6.gif)
![](http://www.4webhelp.net/forums/images/daniel_avatar.php)
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Sat Nov 09, 2002 8:38 pm (21 years, 7 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
I just put together a script to output the amount of space your site is using, in PHP.
To download it, visit http://www.4webhelp.net/scripts/php/space.php
Please let me know if it works, and if not, what errors you get. If you get errors relative to safe mode, I already know about them. |
________________________________
![Image Image](http://www.4webhelp.net/images/daniel_sig.gif) |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Daniel Find all posts by Daniel](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) |
![](images/spacer.gif) |
Jos
Ex Team Member
![](images/rank_5.gif)
![](http://www.josvanras.com/pictures/molen.jpg)
Joined: 08 Jan 2002
Posts: 36
Location: The Netherlands
|
Posted:
Sun Nov 10, 2002 8:42 pm (21 years, 7 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Daniel
Change the line :
$space = $space[0] / 1024;
in
$space = $space[0] / 2048;
Then it's almost the quota that you'll see when you login in the siteadmin.
Sometimes it's gives only 0Mb (when refreshing the browers quickly)
The reason is when using Unix commands in PHP is sometimes a problem because the du command needs time to completed. So it's better to build a time delay before display the output ($space) |
________________________________ Jos
** Team Member ** http://www.josvanras.com ** |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Jos Find all posts by Jos](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
adam
Forum Moderator & Developer
![](images/rank_6.gif)
Joined: 26 Jul 2002
Posts: 704
Location: UK
|
Posted:
Sun Nov 10, 2002 9:15 pm (21 years, 7 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
Jos wrote: | Daniel
Change the line :
$space = $space[0] / 1024;
in
$space = $space[0] / 2048;
Then it`s almost the quota that you`ll see when you login in the siteadmin.
Sometimes it`s gives only 0Mb (when refreshing the browers quickly)
The reason is when using Unix commands in PHP is sometimes a problem because the du command needs time to completed. So it`s better to build a time delay before display the output ($space) | I'm a little confused, why divide by 2048 not 1024? |
________________________________ It's turtles all the way down... |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by adam Find all posts by adam](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
Jos
Ex Team Member
![](images/rank_5.gif)
![](http://www.josvanras.com/pictures/molen.jpg)
Joined: 08 Jan 2002
Posts: 36
Location: The Netherlands
|
Posted:
Mon Nov 11, 2002 6:58 am (21 years, 7 months ago) |
![Reply with Quote Reply with Quote](templates/4WebHelp2/images/lang_english/icon_quote.gif) ![Back to Top Back to Top](templates/4WebHelp2/images/icon_up.gif) |
adam wrote: | I'm a little confused, why divide by 2048 not 1024? |
Because Unix systems are working with another blocks as on your local PC. This mean when the output of this script is 10MB then it's not the Space what you'll see on your local PC when you use the property command. The Siteadmin of 34SP show the quota of a PC system. |
________________________________ Jos
** Team Member ** http://www.josvanras.com ** |
|
![Offline](templates/4WebHelp2/images/offline.gif) ![View User's Profile View User's Profile](templates/4WebHelp2/images/lang_english/icon_profile.gif) ![Find all posts by Jos Find all posts by Jos](templates/4WebHelp2/images/lang_english/icon_search.gif) ![Send Personal Message Send Personal Message](templates/4WebHelp2/images/lang_english/icon_pm.gif) ![Visit Poster's Website Visit Poster's Website](templates/4WebHelp2/images/lang_english/icon_www.gif) |
![](images/spacer.gif) |
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.138084 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |