Explorar el Código

Set “Accept-Encoding: gzip” header

Daniel Aleksandersen hace 7 años
padre
commit
278d6a0ec2
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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'
 		)
 	);