I’m new here. I’ve got a question related to PHP, FTP and CURL.
I need to emulate PHP’s stat() with CURL FTP. I already know that it may take more than one command to do it. Here’s what I’ve got so far (PHP/STAT … FTP/CURL):
- dev
- ino
- mode … LIST *
- nlink
- uid … LIST *
- gid … LIST *
- rdev
- size … SIZE (or better still, use from LIST)
- atime
- mtime … MDTM
- ctime
- blksize
- blocks
*How is FTP LIST used and parsed (preferably on a single file)?
What I need most are the values for atime and ctime, there rest is to be filled for the sake of having full functionality.
My end goal is to have a class for proper FTP access with streamWrapper functionality (so as to bypass allow_url_fopen).
Cheers!
Christian Sciberras
Thanks to Gordon’s comment above.
If anything changes (i.e. I find some new stuff in the FTP spec) I’ll update the answer.