diff options
| author | horus | 2020-09-18 21:27:29 +0200 |
|---|---|---|
| committer | horus | 2020-09-18 21:27:29 +0200 |
| commit | 8e6c5c4b8f59e9874aa99bb5db5de8f521de0ab3 (patch) | |
| tree | 5a3d68b6c38edcc91f99541c675508346345674c /app | |
| parent | e8f3f14a392f1cc5a69f907d1705beed77f894e6 (diff) | |
| download | senpai-8e6c5c4b8f59e9874aa99bb5db5de8f521de0ab3.tar.gz | |
camo the images
Diffstat (limited to 'app')
| -rw-r--r-- | app/helpers.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers.php b/app/helpers.php index 9d1586c..4c946f7 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -116,3 +116,15 @@ function getSeasonFromDate($aired_at) { return array("name" => getSeason($aired_from->month), "year" => $aired_from->year); } + +function camo($url) { + if ( "" != env("GOCAMO_HMAC") && "" != env("GOCAMO_URL") ) { + $phpamo = new \WillWashburn\Phpamo\Phpamo( + env("GOCAMO_HMAC"), + env("GOCAMO_URL") + ); + return $phpamo->camo($url); + } + + return $url; +} |
