Welcome to collectivesolver - Programming & Software Q&A. A website you can trust. I check, compile and run every program. Contact me at: aviboots(AT)netvision.net.il

Hostgator - Save 50% Off Your New Optimized WordPress Hosting With Coupon: WDA50

BlueHost Web Hosting

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

Dedicated Hosting Superb Internet

Ecommerce Software - Best Ecommerce Platform Made for You - Free Trial

getflywheel wordpress hosting


Distribute your Resume to 500+ Job Boards & Recruiters


6,580 questions

9,399 answers

573 users

How to use $http_response_header in PHP

1 Answer

0 votes
file_get_contents("http://www.collectivesolver.com");

echo "<pre>";
var_dump($http_response_header);
echo "</pre>";


 
/*
run: 

array(13) {
  [0]=>
  string(15) "HTTP/1.0 200 OK"
  [1]=>
  string(24) "X-Powered-By: PHP/5.4.45"
  [2]=>
  string(56) "Set-Cookie: PHPSESSID=tcl2s7k8uqosc7hhmov9s247a4; path=/"
  [3]=>
  string(38) "Expires: Thu, 19 Nov 1981 08:52:00 GMT"
  [4]=>
  string(77) "Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0"
  [5]=>
  string(16) "Pragma: no-cache"
  [6]=>
  string(98) "Set-Cookie: qa_key=t2xmx2svxrlri; expires=Tue, 12-Sep-2017 13:58:46 GMT; path=/"
  [7]=>
  string(38) "Content-Type: text/html; charset=utf-8"
  [8]=>
  string(21) "Vary: Accept-Encoding"
  [9]=>
  string(35) "Date: Sun, 10 Sep 2017 13:58:46 GMT"
  [10]=>
  string(20) "Accept-Ranges: bytes"
  [11]=>
  string(17) "Server: LiteSpeed"
  [12]=>
  string(17) "Connection: close"
}
  
*/ 

 




answered Sep 10 by avibootz
...