Answer the question
In order to leave comments, you need to log in
How to read a remote file line by line via FTP?
There are log files on the server, the connection to it goes via FTP. It is necessary to periodically parse these files and enter the results into a database table. How to read remote file line by line in PHP?
Answer the question
In order to leave comments, you need to log in
Try the same as with a local file - fopen(' ftp://... ', '...'); further reading line by line.
Restrictions - php.net/manual/ru/wrappers.ftp.php Line
-by-line reading example - php.net/manual/ru/features.remote-files.php
Didn't check, but it should work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question