PHP Headers - Header string - Where to find
by pizzipie from LinuxQuestions.org on (#5ACWZ)
I have recently had to use a few PHP header() functions and was steered to Location: and replace: headers by helpfull programmers. Before that I had never heard of them.
definition:
header ( string $header [, bool $replace = TRUE [, int $http_response_code ]] ) : void
Examples:
header("Location:showflagsab.php?id=$divert");
header('Location: http://www.example.com/');
header( "refresh:10; url=PizziFrontEnd.php" );
header('Content-Type: application/json');
header(HTTP ....
I have used these without any knowledge of how they are constructed or used.
Where can I get a list of the header $strings like Location, refresh, Content-Type , etc, etc, etc. and instructions as to their use?? The w3Schools site and PHP manual don't tell anything about the header strings themselves!
Thanks in advance for help in this,
R


definition:
header ( string $header [, bool $replace = TRUE [, int $http_response_code ]] ) : void
Examples:
header("Location:showflagsab.php?id=$divert");
header('Location: http://www.example.com/');
header( "refresh:10; url=PizziFrontEnd.php" );
header('Content-Type: application/json');
header(HTTP ....
I have used these without any knowledge of how they are constructed or used.
Where can I get a list of the header $strings like Location, refresh, Content-Type , etc, etc, etc. and instructions as to their use?? The w3Schools site and PHP manual don't tell anything about the header strings themselves!
Thanks in advance for help in this,
R