Reputation: 20792
I am having the following difficulties: Three servers A,B,C : A,B in the same network domain; C in another. PHP scripts executing on server A write to a shared folder on server B. The same scripts executing on server C fail to write to server B.
PHP looks something like this:
oject->Output('\\\\serverB\\sharedfolder\\file.dummy');
Is there any way I can make this script work elegantly on server C?
When I remote-desktop to server C and want to see the contents of \\serverB\sharedfolder
, a login prompt pops up and asks for a user name and password. This I can provide and subsequently access the shared folder on server B. But how could I do this from a PHP script? Is it possible?
Upvotes: 0
Views: 4220
Reputation: 845
I think the easiest option with security in mind would be to write the content from server C in to a socket where server A,B reside and have an additional script which will save the content written from the socket to your shared folder.....
http://www.php.net/manual/en/function.fsockopen.php
Upvotes: 0
Reputation: 134711
The formats are:
\\servername\sharename%username:password
smb://[[domain;]username[:password]@]server[/share[/path]]
Upvotes: 1