What is the right way (or any way) to automatically make a mirror copy of an image file to another server when running perl script? I have a script where user submits formdata (text) and same time the script should make a mirror copy of a certain file to another server. This is needed, because I'd like to run script only on server1 but have all pictures uploaded/stored to server2. Server2 would not have any scripts running in it if possible. Currently I get pictures uploaded to server1 where they should be copied/moved to server2.
My hosting company has perl 5.8.0 installed (and php 4.3.10 if it matters).
This is the idea:
http://www.server1.com/dirA/image1.jpg
-to-
http://www.server2.com/dirB/image1.jpg
I don't post any code with this question to not narrow your mindflow. I've days/nights worth of test code, which fails no matter what I do. I'd like to know what you would do in this case. Thanks in advance!
<db>