RSS | Archive | Random | E-mail

About

Hi, I'm Christian Castelli, a 28 years old italian programmer located in Pisa (Italy). Here I post small snippets of code which can be useful in my work.

Links

Codepuzzling main site
Development site
ByteStrike italian blog
Follow me on Twitter

My Life Style

while(passion) {
  try {
    myLife.run();
  }catch(LifeExceptions) {  
    stronger++;
    continue;
   }
}

Following

5 June 09

[PHP] How to retrive HTTP headers


$var = "REQUEST";

foreach (apache_request_headers() as $name => $value) {
    $var.= "$name: $value
"; } $var.= "RESPONSE"; foreach (apache_response_headers() as $name => $value) { $var.= "$name: $value
"; } echo $var;
Anyway response header returned by apache_response_headers() consists only of server signature in my case, but in firebug I can see a lot more of them.

Tags: php
Comments (View)
  1. andreaolivato reblogged this from codepuzzling
  2. codepuzzling posted this
blog comments powered by Disqus
Themed by Hunson. Originally by Josh