浏览代码

Set “Accept-Encoding: gzip” header

Daniel Aleksandersen 7 年之前
父节点
当前提交
278d6a0ec2
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/contents.php

+ 2 - 1
lib/contents.php

@@ -7,7 +7,8 @@ function getContents($url
 ){
 	$contextOptions = array(
 		'http' => array(
-			'user_agent' => ini_get('user_agent')
+			'user_agent' => ini_get('user_agent'),
+			'accept_encoding' => 'gzip'
 		)
 	);