Re: RE: looking for two remote functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Riyadh S. Alshaeiq wrote:
Thank you Mickey, but I have already looked in there and the function posted
in the notes is working just fine for getting the size on disk which I am
not interested in, I need the actual size that when you download a file to a
machine you will get..

Riyadh

-----Original Message-----
From: Mikey [mailto:frak@xxxxxxxxxx] Sent: 9/Mar/2007 2:57 PM
To: php-general@xxxxxxxxxxxxx
Subject: Re: looking for two remote functions

Riyadh S. Alshaeiq wrote:
Hello everybody,

 I am looking for an HTTP function for getting remote filesizes. Keeping
in
mind that I am NOT interested in getting the "size on disk" figure, I need
the actual size of the files when downloaded to a local machine. Please
let
me know if there are any..

Another thing, I also need a remote function that gets the created date
and
last modified separately, if possible..

Best regards



Try looking here:

http://uk.php.net/manual/en/function.filesize.php

If the function itself isn't of use to you, look further down in the notes and I am sure you will find something useful.

Mikey

Ok, been listening/reading this for a few days now.

Are you wanting to get the block size of a file that you plan on downloading from a server to your local computer?

If so, is your client going to be on a windows box or *nix box or mac?

They all have different block size.

Default for linux is 1024, default for openbsd is 512, and probably even different for a mac even though it is running a flavor of bsd.

You can see how this might cause a problem in determining the number of blocks that a given file will occupy once downloaded.

There is now php/javascript/html/css/etc... function that will give you the block size of the client. Only then would you be able to calculate the actually number of blocks that will be required for any given download.

You can, how ever, calculate the number of blocks that a file takes up on a server, by looking at various specs on the system.
	ls -s <filename>
will return to you the number of blocks that a file occupies on the server file system. This number may, but probably not, correspond to the number of blocks the same file will occupy on your client system.

Hope this clears things up a bit.

I will be glad to offer more advice if more is needed.

--
Enjoy,

Jim Lucas

Different eyes see different things. Different hearts beat on different strings. But there are times for you and me when all such things agree.

- Rush

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux