thephpleague / color-extractor

Extract colors from an image like a human would do.
thephpleague.com
MIT License
1.3k stars 159 forks source link

use curl insted of file_get_content if available #60

Closed tamer-badawy closed 2 years ago

tamer-badawy commented 4 years ago

As i worked in project and allow_url_fopen is disabled for security reason . so try to use curl by default. If not installed then use file_get_contents

colinodell commented 2 years ago

I don't want to invoke curl for local files, so I've moved your implementation inside a new method called fromUrl() which should accomplish what you're looking for :)

colinodell commented 2 years ago

Implemented in v0.4.0. Thanks for the PR!