How to get details like PHP stat () but using (raw) FTP (CURL)?

I'm new here. I have a question related to PHP, FTP and CURL.

I need to imitate PHP stat () with FTP CURL. I already know that this may require several teams. Here is what I still have (PHP / STAT ... FTP / CURL):

  • Dev
  • foreign
  • mode ... LIST *
  • nlink
  • uid ... LIST *
  • gid ... LIST *
  • rdev
  • size ... SIZE (or use LIST nonetheless)
  • Atime
  • mtime ... MDTM
  • CTime
  • BLKSIZE
  • blocks

* How is FTP LIST used and analyzed (preferably in a single file)? Most of all I need values ​​for atime and ctime, the rest should be filled for the sake of full functionality.

My ultimate goal is to have a class for proper FTP access using the streamWrapper function (to bypass allow_url_fopen).

Hooray! Christian sciberras

+3
1

. - (, - FTP), .

+1

Source: https://habr.com/ru/post/1741747/


All Articles