Thank you for your answer.
If I disable UFW on my Debian server then it works.
I have yet to figure out why the firewall is blocking this. The only thing I have configured is two ports open for incoming connections (80 and 443). As far as i know, by default, UFW is configured to deny all incoming traffic and allow all outgoing traffic.
I noticed that when I use file_get_contents, only requests with https are blocked, it works with http.
Receive data via https (not working)
php -r 'echo file_get_contents("https://download-chromium.appspot.com/rev/Linux?type=snapshots");'
Receive data via http (works)
php -r 'echo file_get_contents("http://eu.httpbin.org");'
I know this is off topic, but maybe it will help someone to understand who has a similar problem.