upload image to my other site

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pagegen
Forum Commoner
Posts: 32
Joined: Sat May 31, 2008 6:38 am

upload image to my other site

Post 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.";
            }
            
      ?>
 
Post Reply