Remote Image Upload

Discussion in 'PHP' started by fairuz.ismail, Feb 7, 2008.

  1. #1
    Hi,
    my system allow users to give the image url (means the image they provide is hosted elsewhere). So is it possible to reupload that image to my server using php? thanks a lot
     
    fairuz.ismail, Feb 7, 2008 IP
  2. AsHinE

    AsHinE Well-Known Member

    Messages:
    240
    Likes Received:
    8
    Best Answers:
    1
    Trophy Points:
    138
    #2
    I guess you should use these functions:
    
    $image = file_get_contents($remote_url);
    file_put_contents($filename,$image);
    
    PHP:
     
    AsHinE, Feb 8, 2008 IP