mz

http头

php获取http头函数getallheaders:(apache环境下)

array(10) {
  ["Cookie"]=>
  string(54) "cart_goods_num=0; PHPSESSID=lhlhjjecok8lu5nirqpqi59v84"
  ["Accept-Language"]=>
  string(14) "zh-CN,zh;q=0.9"
  ["Accept-Encoding"]=>
  string(13) "gzip, deflate"
  ["Accept"]=>
  string(85) "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
  ["User-Agent"]=>
  string(115) "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36"
  ["Upgrade-Insecure-Requests"]=>
  string(1) "1"
  ["Cache-Control"]=>
  string(8) "no-cache"
  ["Pragma"]=>
  string(8) "no-cache"
  ["Connection"]=>
  string(5) "close"
  ["Host"]=>
  string(24) "www.merge_cloud.com:2345"
}

 

码字很辛苦,转载请注明来自明志博客《http头》

评论