I know nothing about php, but it seems like to answer this question you need no php knowledge... Hope this helps:
1. With what protocol does this 'url' connect?
This is called UNC Path. See more details from wiki: Path (computing)
Quote:
A UNC path describes the location of a volume, directory, or file.
The format for a UNC path is \\server\volume\directory\file and is not case-sensitive.
2. Why does it need a $ at the end of the driver?
The $
stands for a hidden share, see more from Microsoft Knowledge Base
3. For your last question, 'Passing UNC username and password within a UNC path'
There is an answer to a similar question on SuperUser.
Quote answer from @grawity's answer
On Windows, you cannot put credentials in UNC paths. You must provide them using net use
, runas /netonly
, or when asked by Windows. (If you have some programming skills, you can store the SMB password as a "domain credential" using CredWrite()
, which is equivalent to checking the "Remember password" box in Windows.)
On Linux, it depends on the program.
GNOME's Gvfs accepts the
user@host
syntax, but appears to completely ignore the password. (However, you can store it in GNOME Keyring beforehand.)smbclient
uses the same UNC syntax as Windows; however, it has an--authentication-file
option from which credentials could be read.Both programs above are using libsmbclient, and can use Kerberos authentication instead of passwords: run
kinit user@YOUR.DOMAIN
and usesmbclient -k //host/share
. This is more secure than password authentication.
Note that putting passwords into URIs is deprecated, and you should not rely on it being supported anywhere.