Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To View Cookie Header Lines
How To View Cookie Header Lines? - PHP Script Tips - Understanding and Managing Cookies
✍: 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.
2007-04-24, 5102👍, 0💬
Popular Posts:
How can I enable session tracking for JSP pages if the browser has disabled cookies? We know that se...
How can I execute a PHP script using command line? Just run the PHP CLI (Command Line Interface) pro...
How can I implement a variable field width with printf? That is, instead of something like %8d, I wa...
How To Enter a New Row into a Table Interactively? - Oracle DBA FAQ - Introduction to Oracle SQL Dev...
How many bits are used to represent Unicode, ASCII, UTF-16, and UTF-8 characters? Unicode requires 1...