Click here to Skip to main content
15,034,432 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I had two servers name(Server-A & Server-B). Then Server-B having photoupload.php, i want upload photo using photoupload.php page but, Image saving directory('Images') is in Server-A

i need the source code to save Images in another server-A......

please help me.

Thanks in advance.....!
Posted
Comments
ZurdoDev 11-Jul-13 8:41am
   
Just change your code to save it where you want to. It sounds like you have a web farm or load balancing so you'll need to change the code to save to a network share.

1 solution

Hello,

You can have a look at following links.

  1. Assuming both your servers are Unix/Linux boxes, then you can refer to PHP:SSH2 Manual[^] to know more about file transfer via SSH in PHP.
  2. You can even use FTP. Please have a look at PHP: FTP Manual[^] to know more about transferring files via FTP in PHP
  3. You can even do the same using CURL. For this option to work the receiving side (Server-A) you must have a PHP page which can receive a file (Probably Similar to photoupload.php). Please refer to Send a file via POST with cURL and PHP[^] article.

Regards,
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900