try looking into PHP sockets, such as fsockopen, use with IO commands such as fopen, fgets, fputs etc...
because you need to connect on the port with the relevant username and password before you can upload your files from your PC etc...
Hope this helps!