Page 1 of 1

upload image to my other site

Posted: Wed Sep 17, 2008 9:02 am
by pagegen
i have to site..

i want to allow the users to upload there images from 1 site.. but they go to my other site..

am trying this but it wont work,, isit possible to do?

Code: Select all

<?php
 
        
        
        
        $target = "http://gameon5.com/images/";
            $target = $target . basename( $_FILES['uploaded']['name']) ;
            $ok=1;
            if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target))
            {
            echo 'Successful';
            echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded" . '<br>';
                    }
            else {
            echo "Sorry, there was a problem uploading your file.";
            }
            
      ?>