Link to home
Start Free TrialLog in
Avatar of martman2002uk
martman2002uk

asked on

Size properties of website

Hi.

i have a website www.martman.co.uk and i want to know if there is a way to make a php file or something along those lines that when i navigate to i can see how much space is being used by my website? (like the right click properties dialog box you get in windows)

or is there a program out there that will give me a folder size sort of thing, if possible one that i dont have to upload to my website/ or add files to my website in order for it to work.
Avatar of Imme-emosol
Imme-emosol

I think you will have to upload a file to your browser. Or maybe you ca use a ftp-client, login select all folders/files and click properties.

Anyways, there's a php-function here: http://lixlpixel.org/recursive_function/php/get_size_recursively/

It's quite well documented, so you should be able to manage it. If you have any questions though, do ask.
Avatar of martman2002uk

ASKER

when i said i didnt want to upload anything i knew i'd have to upload a file.

i'm new to this and am not very good with php, have tried to find a php/html file that when uploaded to the web will give me the total size of all files and folders where the file is.

so if the file is uploaded into /images it will give me the size of everything in /images as well as /images/headers, etc...
You probably can use the function on the uri that I put in my first message then in the php file you want to use inside images folder, you can call that function and as directory input you can give it dirname(__FILE__) for instance, or just '/images/' perhaps. The function will go through all sub-dirs for you. The function should then return the size of the dir and it's subs.
if i put that php file in my main directory, where my index is, what do i need to change in the php file to make it work for me and for me to be able to read it, sorry my php skill is almost non-exsistant and i'm probably missing something trivial.
ASKER CERTIFIED SOLUTION
Avatar of martman2002uk
martman2002uk

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial