Tools, FAQ, Tutorials:
Viewing Cookie Header Lines in PHP
How To View Cookie Header Lines in PHP?
✍: FYIcenter.com
If you are interested to see the cookie header lines, or you are having trouble with your cookies and need to see the cookies to help debugging, you can run your script with PHP CGI interface in a command line window. The following tutorial exercise shows you a good example:
>edit showing_cookie_header_lines.php
<?php
setcookie("LoginName","FYICenter");
setcookie("PreferredColor","Blue", NULL, "/store");
setcookie("CouponNumber","07470433",time()+60*60*24*7,"/store");
setcookie("CouponValue","100.00",time()+60*60*24*7,
"/store", ".fyicenter.com");
print("4 cookies were delivered.\n");
?>
>php-cgi showing_cookie_header_lines.php
Content-type: text/html
X-Powered-By: PHP/5.0.4
Set-Cookie: LoginName=FYICenter
Set-Cookie: PreferredColor=Blue; path=/store
Set-Cookie: CouponNumber=07470433; expires=Sun, 05 Mar 2006
02:33:43 GMT; path=/store
Set-Cookie: CouponValue=100.00; expires=Sun, 05 Mar 2006
02:33:43 GMT; path=/store; domain=.fyicenter.com
4 cookies were delivered.
⇒ Cookies Transported from Browsers to Servers in PHP
⇐ Cookies Transported from Servers to Browsers in PHP
2016-11-02, ∼2380🔥, 0💬
Popular Posts:
How to read RSS validation errors at w3.org? If your RSS feed has errors, the RSS validator at w3.or...
How to Install Docker Desktop 2.5.0 on Windows 10? You can follow this tutorial to Install Docker De...
How To Access a Global Variable inside a Function? in PHP? By default, global variables are not acce...
How To Open Standard Output as a File Handle in PHP? If you want to open the standard output as a fi...
How to pull NVIDIA CUDA Docker Image with the "docker image pull nvidia/cuda" command? If you are ru...