It sends an HTTP cookie without URL encoding the cookie value
Example
<?php
setrawcookie(“time”,time());
echo $_COOKIE[‘time’];
?>
Output
1337938950
It sends an HTTP cookie without URL encoding the cookie value
Example
<?php
setrawcookie(“time”,time());
echo $_COOKIE[‘time’];
?>
Output
1337938950
It sends an HTTP cookie to a client
Example
<?php
setcookie(“time”,time());
echo $_COOKIE[‘time’];
?>
Output
1337938449
It checks whether headers have been sent .
Example
<?php
if (!headers_sent()) {
header(“Location: http://www.phpcodez.com/”);
exit;
}
?>
It returns a list of response headers sent
Example
<?php
setcookie(“time”,time());
header(‘Content-type: text/plain’);
echo “<pre>”;
print_r(headers_list());
?>
Output
<pre>Array
(
[0] => X-Powered-By: PHP/5.3.3-1ubuntu9.10
[1] => Set-Cookie: time=1337938449
[2] => Content-type: text/plain
)
It sends a raw HTTP header to a client.
Example
<?php
header(‘Location: http://www.phpcodez.com/’);
?>