I want to be able to connect to a distant folder based on user's input. The system has to be compatible with different sharing protocols so I can't just use FTP in every case (distant folders are not necessarily implementing FTP).
Right now opendir('//HDD/Music');
works because this is a public folder, but for others that need username/password it doesn't work. I already tried opendir('//username:password@HDD/Music');
which doesn't work.
I don't want to mount the folder either (net use) because this code is intended to be used by normal users and shouldn't interfere with their environment.
To sum up:
opendir('//HDD/Public_folder');
works
opendir('//username:password@HDD/Public_folder');
doesn't work
opendir('ftp://HDD/disk1/Public_folder');
works
opendir('ftp://username:password@HDD/disk1/Private_folder');
works
Thanks.