Hi guys... I am working on something where I need to write an image from an HTML form input to a different domain.... here is the code: $a = rand(0,9999); $n = rand(0,9999); $d = rand(0,9999); $source = $_FILES[banner_file][tmp_name]; $fileupload_name = $_FILES[banner_file][name]; $fileupload_name = "$a$n$d-$fileupload_name"; $uploadpath = "http://img.rubydomain.com/ads/"; $dest = $uploadpath.$fileupload_name; if (copy($source,$dest)) { } Code (markup): When i run it though I get: Warning: copy(http://img.rubydomain.com/ads/img00001.gif) [function.copy]: failed to open stream: HTTP wrapper does not support writeable connections. in /var/www/rubydomain/test.php on line 10 Code (markup): I have a form on www.rubydomain.com that I have a form which I select an image from my PC then submit the form. Normally I would save this file in the same domain but in this case I want to copy the file to a different domain (img.rubydomain.com), but its not letting me. Yes the http://img.rubydomain.com/ads/ directory is set to CHMOD 777. How can I do this? Is there another way? SURELY there is a way to write it to a different domain!!!
Is the other domain on the same server, or a different server? You could always make a small script that accepts a POST request with the image data in one variable. And then send the image data from the original domain with CURL.