This is the beginning of what could be a PHP FTP client. It connects to a server, logs in, and displays directory content using FTP (File Transfer Protocol).
I have placed a working sample here. It has been modified to take the login parameters as cookies. I have only tested this script using my Linux server. I don't know if it can be used to FTP into Windows.