Craig
Craig

Reputation: 1219

PHP Server to Server Transfers

We are storing a Final Image, Back and Front proof and a thumbnail on one server, but what I need to is when the user goes to took at their images, it needs to transfer the image from the image server on to our web server.

I have tried opening the the server connection and the transferring the image from where it is to where the .php file that has opened the connection is, but i just continually got errors saying that the stream could not be opened because the directory didn't exist. And i had tried to open up two connections (one for each server) and using get and put to move it from server to server.

These images can't be stored on a intermittent PC. Any help or advice on how to do this?

Upvotes: 2

Views: 299

Answers (2)

Mathew Hall
Mathew Hall

Reputation: 1004

What is the purpose of the image server you're using? Are you sure you need to transfer the image across to your other server rather than just having the HTML the web server is producing link to the image server?

Other than that you might want to look into using NFS rather than programatically transferring the files yourself every time they're requested (assuming you're using some form of *nix on both machines and can create NFS shares).

Upvotes: 1

Saulius Žemaitaitis
Saulius Žemaitaitis

Reputation: 2974

You could try transferring the image directly to the user through Apache mod-proxy connection. I'm sure there are ways to work out user permissions between the servers.

Upvotes: 1

Related Questions