copy file to remote computer

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ramsei
Forum Newbie
Posts: 4
Joined: Thu Jun 12, 2008 1:43 pm

copy file to remote computer

Post by ramsei »

I use HTTP with CURL/file_get_contents/fopen to copy/write file contents from remote server to local file.

Now, I need to copy local binary file into remote Win XP computer: C:/remote-folder-path/file . I only have remote IP address. This remote computer is not on LAN, if computer was, then very easy; simply cut and paste :).

I tried using PHP FTP: ftp_connect but I think remote computer needs FTP program to be installed for it to work.

Can this be done with fsockopen and send file through open port? Or some other way?
pkbruker
Forum Commoner
Posts: 32
Joined: Sun Aug 03, 2008 9:36 am
Location: Oslo, Norway

Re: copy file to remote computer

Post by pkbruker »

Installing an FTP-server would be a good idea. You need some sort of program which can recieve the file (otherwise one could upload files to just about any computer).
ramsei
Forum Newbie
Posts: 4
Joined: Thu Jun 12, 2008 1:43 pm

Re: copy file to remote computer

Post by ramsei »

If I cannot send a file through a port, then why install a software firewall to block ports like what Zonealarm does ?
dajawu
Forum Commoner
Posts: 59
Joined: Fri May 23, 2008 10:16 am

Re: copy file to remote computer

Post by dajawu »

Its not files you need to worry about, some ports that are for other reasons can be bombarded with junk info causing problems to the remote computer. Back in the day there was a WinNuke program that would send info to some port (113 or something) and cause a Blue Screen of Death.
Post Reply