Last active
April 7, 2017 16:56
-
-
Save neilmaledev/d255c42f1289a9ab9394121b7896d4d3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use S3; | |
| =========================== | |
| //depends on your credentials | |
| $AWS = [ | |
| 'key'=> 'youS3Key', | |
| 'secret' => 'imBatman', | |
| 'bucket' => 'bucketNameHere']; | |
| new S3($AWS['key'], $AWS['secret']); | |
| $url = file_get_contents("https://b.fastcompany.net/multisite_files/fastcompany/imagecache/inline-small/inline/2015/09/3050613-inline-i-2-googles-new-logo-copy.png"); | |
| $customName = "upload/result.png"; | |
| //this is what u're looking for | |
| S3::putObjectString($url, $AWS['bucket'], $customName); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment