php - How to copy a file from a website to amazon bucket using zend service amazon? -


i need copy resource website s3-bucket. example image 'http://upload.wikimedia.org/wikipedia/commons/6/63/wikipedia-logo.png' need copy folder in s3-bucket. possible using zend_service_amazon?

you have use stream wrappers. haven't dealt image files hope work .

      $s3 = new zend_service_amazon_s3($my_aws_key, $my_aws_secret_key);       $s5="s".rand();       $s3->registerstreamwrapper($s5);        //$bucketname- bucket name       mkdir($s5."://".$bucketname);         //$path - want store file including bucketname       $s1=$s5."://".$path;       $filedata = file_get_contents('yourimage url');       file_put_contents($s1, $fildata); 

Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -