Page 1 of 1

Is it possible to access a network share using PHP?

Posted: Sat Sep 23, 2006 10:33 pm
by joshelley
I'm trying to create a php script on a local server to read data from a shared folder from another computer on the same LAN and Workgroup as the php server. Is this possible?

::edit::

The php server is running SUSE linux and is trying to connect to a microsoft network's share

::edit::

Posted: Sat Sep 23, 2006 11:02 pm
by Chris Corbyn
The linux bit is vital. A "network share" is specific to the OS. In linux you'd just use NFS (server:/share) but in window they use a windows networking protocol (\\server\share).

To use the windows file sharing protocol under linux you need samba.

Posted: Sun Sep 24, 2006 7:09 am
by joshelley
Yeah I've heard of samba. Is PHP compatible with Samba?

Posted: Sun Sep 24, 2006 7:32 am
by Chris Corbyn
joshelley wrote:Yeah I've heard of samba. Is PHP compatible with Samba?
Well you can "mount" drives in samba with smbmount so php would be able to access those.

Posted: Sun Sep 24, 2006 11:02 am
by joshelley
duh, that should've clicked for me lol.