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
passing user and password with FOPEN
Moderator: General Moderators
-
joseluisloya
- Forum Newbie
- Posts: 3
- Joined: Tue Jul 18, 2006 10:56 pm
just put a backslash behind the $
$handle = fopen("ftp://user:password@example.com/\$hiddenfile", "w");
So, \$, and you dont will have problems..
Good look
JoseLuis Loya.
$handle = fopen("ftp://user:password@example.com/\$hiddenfile", "w");
So, \$, and you dont will have problems..
Good look
JoseLuis Loya.