diff --git a/src/Intervention/Image/AbstractDecoder.php b/src/Intervention/Image/AbstractDecoder.php index 74e158ad..c4a4616d 100644 --- a/src/Intervention/Image/AbstractDecoder.php +++ b/src/Intervention/Image/AbstractDecoder.php @@ -61,6 +61,17 @@ abstract class AbstractDecoder */ public function initFromUrl($url) { + + $options = array( + 'http' => array( + 'method'=>"GET", + 'header'=>"Accept-language: en\r\n". + "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.2 (KHTML, like Gecko) Chrome/22.0.1216.0 Safari/537.2\r\n" + ) + ); + + $context = stream_context_create($options); + if ($data = @file_get_contents($url)) { return $this->initFromBinary($data); }