Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Setting:

--------------------            -------------------
|COMP A (201.1.1.4)             |COMP B (101.1.1.2)
--------------------            -------------------
|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
    
Please go through your previous questions and accept answers given to you. Having a 25% accept rate on 18 questions isn't helping your ability to get help here. –  EEAA May 12 '12 at 16:19
1  
I am doing that right now :) –  DucDigital May 12 '12 at 16:20
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.