0

How can I create a P2P script without a main server to manage connections and file transfer? No seed/leech thing, just from one computer to another computer.

I already read a couple of similar questions on SO but I want to explain exactly what I need and maybe a miracle will happen.

Explained:

User A & B, both have a PHP server installed locally.

User A type 127.0.0.1:[server port] and get a page with : 1 IP, 17 files. User A click on the IP and get the list of files. If he click on a file, a jQuery/PHP script will download the file to the htdoc directory. the User B sees an alert on his/her side (127.0.0.1[server port]) that user A is downloading this file.

Is it possible? And any hints to accomplish this?

Second question: User A changes his/her IP, a HTTP request is made to user B and the new IP is stored in a local SQLite DB. (For that part, it's okay, the script check each X minutes if the IP is the same, on change, it sends the request)

What if both user changes their IP at the same time? They will need to contact each other to get their current IP address and update it manually? Does this make sense?

jamesmortensen
  • 33,636
  • 11
  • 99
  • 120
Jeremy Dicaire
  • 4,615
  • 8
  • 38
  • 62
  • 2
    Hi Jeremy, I made some edits to your post to put the actual question at the top of the body. The preview on the main page is only 2 lines long, so this ensures that your question is visible, potentially enticing more to visit and help, instead of "greetings" or "hello" or "good evening", etc. Hope this helps! :) – jamesmortensen Jan 07 '13 at 01:01
  • 1
    Why don't both users have some dns service, so problem, that users won't find themself will disapear... – Glavić Jan 07 '13 at 01:02
  • Thanks jmort253 I appreciate it :) – Jeremy Dicaire Jan 07 '13 at 01:11
  • Thanks Glavić for the idea, I'm going to investigate this. Do you know how can I implement this with a php script? – Jeremy Dicaire Jan 07 '13 at 01:12

1 Answers1

0

you can download the files through the browser. try this step ->1 make the files which you want to share as a zip file. step ->2 once zip file is done (example abc.zip). step ->3 type the local IP 127.0.0.1:[server port] of the A on the browser of B select the listed files and click on zip file you get a option to save the file then you can find in the downloads

user38156
  • 77
  • 5