Share on Google+Share on Google+

setrawcookie()

Advertisement
In this example you will learn how to set setrawcookie()in PHP.

setrawcookie()

setrawcookie is used to set the cookie like setcookie function but it's cookie value will not automatically be urlencoded when send to the browser. 

Syntax

setrawcookie()

Example:

<?php
$expire=time()+60*60*24*30;
$value ="raj the great";
setrawcookie("cookie", rawurlencode($value), $expire);
echo $_COOKIE["cookie"]; # view one cookie value 
?>

Advertisements

Posted on: July 31, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.