How do I use file_get_contents to get a gzip'ed page on a remote web server in php?

孤者浪人 提交于 2019-11-28 14:28:57

Have you tried this?

$content = file_get_contents('http://example.com',false,$context);
PhotoPaul

Try using 'compress.zlib://http://example.com'

Answer taken from here: How can I read GZIP-ed response from Stackoverflow API in PHP?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!