Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having 2 computer on different network over internet.

Currently I am trying to figure out away to connect between the 2 computer for a PHP script.


--------------------            -------------------
|COMP A (             |COMP B (
--------------------            -------------------
|Webserver               <->    |Webserver
|PHP                            |
|Windows Server                 |Ubuntu
|Store only script              |Store files
--------------------            -------------------
*Over Internet , 50mbps link

There are 2 PHP script. One is to put the file in COMP B, and the other one count the number of file in COMP B.

Script 1 current functionality: 
-User upload file. Save the orignal. (/zip/)
-Extract, save it in an extracted folder (/extract/)

Script 2 current functionality:
-Read from /resize/
-if not exist, look for the same file name on the extracted folder (/extract/)
-Resize and save it on the /resize/
-Count file from /resize/ and /extract/

Of course doing a sftp or ftp request will take lots of time, slowdown the performance, and also everytime user access the script, it create another FTP session which is not good.

As I can see this is quite heavy file reading. I need some way of making permanent links between these servers for these purpose. (at least count the number of file on a folder)

I'm looking in VPN and SSH but wondering if there are any software or methods of doing so. Also if you can suggest a better method, please do so.

The script will have to change to adapt to the best method. ^^

Thank you very much. Hope I get the answer soon.

share|improve this question
I am doing that right now :) – DucDigital May 12 '12 at 16:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.