you just want to list the contents in a certain directory of a remote computer/server?
what web server are you running?
IIS or Apache? etc...
if its IIS, you will need to setup shares on the remote server/computer that is using the login name/password as what is used in IIS.
Or else you will be unable to connect over to another windows share/linux samba share with out having rights.... unless the share has no permissions and then you will not need ot worry about this