ohdang888 Posted July 31, 2008 Share Posted July 31, 2008 i own 2 domain names, to make it easy, lets say its name1 and name2 someone uploads a picure onto name1, and i want to upload that picture to name2 too. can this be done?if so, how? thanks. Link to comment https://forums.phpfreaks.com/topic/117634-upload-pic-across-domains/ Share on other sites More sharing options...
blueman378 Posted July 31, 2008 Share Posted July 31, 2008 dint trust me fuly, however i dont think that can be done as it is a massive security risk if you can Link to comment https://forums.phpfreaks.com/topic/117634-upload-pic-across-domains/#findComment-605057 Share on other sites More sharing options...
discomatt Posted July 31, 2008 Share Posted July 31, 2008 If they're not on the same server, you have to ftp into the remote server via php to transfer. Otherwise, just put it in the proper directory. Link to comment https://forums.phpfreaks.com/topic/117634-upload-pic-across-domains/#findComment-605080 Share on other sites More sharing options...
mbeals Posted August 1, 2008 Share Posted August 1, 2008 what is the server environment? easiest thing to do would be to write a script to sync the files that you trigger after an upload with either system(), exec(), or backticks, depending on what level of interaction verification you need. if both hosts are linux, look into rsync. Otherwise ftp is your best bet. If it's not critical the servers are in real time sync, I'd just rsync each dir with a cron job. even if you need it real time and do the transfer on a per-transaction basis, i would still have a cron job that runs every night or so to make sure the dirs are in sync. if the directory you are using to hold the images is locked down, and you take sufficient precautions, I don't see this being a security risk at all. Link to comment https://forums.phpfreaks.com/topic/117634-upload-pic-across-domains/#findComment-605153 Share on other sites More sharing options...
cooldude832 Posted August 1, 2008 Share Posted August 1, 2008 cURL Link to comment https://forums.phpfreaks.com/topic/117634-upload-pic-across-domains/#findComment-605186 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.