How to send files to another machine by using IP-address

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
chinni
Forum Newbie
Posts: 1
Joined: Wed Jul 09, 2003 5:20 pm

How to send files to another machine by using IP-address

Post by chinni »

Hello everybody,

I've 3 form fields in a form:User name, Password and IP-address.I store the user names and passwords in a flat file.Now, when i enter the username, password and IP-address and hit a button, I want to get connected to the given IP-address of the machine provided if the user name and password is matched.Once, if this is done, i should be able to send files, commands or variables.The remote entity creates a folder and save the files into it.
Could somebody please give me an in-sight how should i do this one???

Thanks in advance
Galahad
Forum Contributor
Posts: 111
Joined: Fri Jun 14, 2002 5:50 pm

Post by Galahad »

I think it's more complicated than you want it to be. You can't just share file with someone once you know their ip address. Imagine the security risk that would be, anyone could read (maybe even write!) to your disk if they just knew your ip address. The person you are trying to connect to needs to have some program running (like an ftp or web server) that handles a connection when you connect to that ip.

The closest way I see to doing what you want (creating a remote directory and putting files into it) is to use ftp, but that requires all the people who use your system to have an ftp server running. Most people don't. Perhaps someone else can come up with a more creative way to do it than that. I suppose you could also conceivable use windows file-sharing (or samba), but I think that gets much more complicated. What exactly is it that you want to do?
Post Reply