Hi!
Just want to know if this can be done:
I have some textfiles (.txt) on an FTP-server. Is there a way to get/feed those files on a page in php or html?
Hi!
Just want to know if this can be done:
I have some textfiles (.txt) on an FTP-server. Is there a way to get/feed those files on a page in php or html?
Yes, but you'll need a http server too.
Just use php's FTP-functions.
Does it have to be a HTTP server... I only have access to an ftp-server!
The files are uploaded through a ftp-program to an account.
You need a web server in order to serve the webpages.
You dont necessarily have to use PHP's FTP functions, since you might be able to do what most people do: upload the PHP scripts via FTP, then the rest of world downloads the scripts via HTTP, after the web server has parsed them using PHP.
Conversely, you could have a PHP script that connects to the files via FTP too, and then dynamically displays them.
In this case, you'll have to use PHP's FTP functions.
But the PHP script still needs a web server in order for the dynamic webpages to be served to the user.
Yeah...thats what I thought!
Of course a "normal" server to host the php "viewpage". The prob is how I would get the textfiles that are on an ftp-server.
Why not download them to the server that hosts the web server?
You could do that using PHP's FTP functions, especially if the files are dynamic, and for some reason have to stored on that remote server.
If they are static, then you could simply bypass this extra server.