passing user and password with FOPEN
Posted: Wed Jul 12, 2006 4:47 pm
The PHP docs quote that you can pass user credentials with ftp and http protocol.
$handle = fopen("ftp://user:password@example.com/somefile.txt", "w");
But how about an intranet application
where the server address is say ausydnvvvppp04 and is accessible usually on the intranet by typing http://ausydnvvvppp04 and where I wish to write a file to a hidden share on that box say ausydnvvvppp04/share$ and I wish to pass active directory credentials to access the share eg user = test, and password = testpwd.
I am not sure what the correct syntax is to achieve that.
Any assistance will be greatly appreciated.
- Andrew
$handle = fopen("ftp://user:password@example.com/somefile.txt", "w");
But how about an intranet application
where the server address is say ausydnvvvppp04 and is accessible usually on the intranet by typing http://ausydnvvvppp04 and where I wish to write a file to a hidden share on that box say ausydnvvvppp04/share$ and I wish to pass active directory credentials to access the share eg user = test, and password = testpwd.
I am not sure what the correct syntax is to achieve that.
Any assistance will be greatly appreciated.
- Andrew