Lets say a have two sites. “Site A” and “site B”.
On site A there is a image that is updated daily.
I want to use this image on site B without linking to site A.
How can I build a PHP script that automatically copies the image from A to B every day?
The best would be if I could do this 100% on the server without involving visits, since site B might be a pure html site. Maybe this can be done using htaccess?
You will not be able to copy a file with an
.htaccessfile.What you should look into is a small PHP script that connects via FTP or SCP to your other server and then downloads your image locally.