ソースを参照

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'
 		)
 	);