I have a server running at home, where I keep some files. I wanted to have on my page, which is on an external server, a way to fetch those files. Does anyone know how I can do this in PHP?
I have a server running at home, where I keep some files. I wanted to have on my page, which is on an external server, a way to fetch those files. Does anyone know how I can do this in PHP?
In this specific case, you might have to use existing solutions such as OwnCloud.
This feature has the name External storage support and you can reference files stored in other points such as:
Local
Amazon S3
Dropbox
FTP
Google Drive
OpenStack Object Storage
SMB/CIFS
ownCloud/WebDAV
SFTP
iRODS
For the external OwnCloud to reach the home server it may be via FTP if it is not a solution to also install OwnCloud on the home server. If it is possible, then it will be easier. Analyze!
That said, and with PHP how do you request the question? The script when running on the external server can with CURL get a list by directory every click . With the list will come the links to them.
To put some security, create a structure for an API and with OAUTH authorizes access. A bit of work, but it will not be difficult to do as we are talking about an online service for personal use where the requirement will certainly not be much.