Re: question

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

 



Riyadh S. Alshaeiq wrote:
Ok.. let me start by thanking you for replying to my question so soon.
Secondly, this the first time that I have posted a question here and I have
read some of the instructions and rules regarding posting a question that is
probably not a big deal to most programmers. Anyhow, you have just proved me
wrong. Sorry, I haven't met any Nigerian scammers so I cannot comment on
that.

Fair enough. But one of the "rules" you missed is that you should include the mailing list in replies. Please don't reply directly to me.

Now, lets talk about the issues.. Actually, the thing is this; I need the
functions for a remote server and the functions in the links are for local
purposes. There is a function that I have used which is posted in the
http://php.net/filesize discussion and it works fine but the result I get is
for a file's size on disk which is not what I am interested in, I need the
size of the file only. The same thing goes for the http://php.net/stat.

Ok, your original post did not say you were looking at remote files. How are you accessing the remote file... HTTP, FTP or something else?

If you are accessing it through HTTP then the comments on the filesize manual page contain good instructions for getting the Content-Length from the response. If you're using FTP then the ftp-size() function will give you what you want.

As far as the created and last modified time goes, if you're using HTTP there may be a header that gives the last modified date, but there is no way to get the created date. For FTP you can use the ftp_mdtm() function to get the last modified date, but again there is no way to get the created date.

Hope that helps.

-Stut

--
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