Soren Winslow Soren Winslow
Cookie Cutter
A script that will display the cookies for the domain that it resides along with their values and key values if they exist. Great utility to check if the cookies are holding the values you expected.

Here is the ASP code for this script:

 <%



  Response.write "<div style=" & chr(34) & "text-align:center;" & chr(34) & ">" & _

                 "<b>Cookies on http://" & Request.ServerVariables("HTTP_HOST") & "</b>" & _

                 "</div>"





  For each CName in Request.Cookies

      Response.Write "<div style=" & chr(34) & "padding:10px;" & chr(34) & ">" & _

                     "<b>Cookie Name</b>: " & CName



      If Request.Cookies(CName).Haskeys Then

         Response.Write "<div style=" & chr(34) & "padding-left:20px;" & chr(34)  & ">" & _

                        "<b>Keys</b>: "

         For Each CKey in Request.Cookies(CName)

             Response.Write "<div style=" & chr(34) & "padding-left:20px;" & chr(34)  & ">" & _

                            "<b>" & CKey & "</b>: " & Request.Cookies(CName)(CKey) & _

                            "</div>"

         Next

         Response.Write "</div>"

      Else

          Response.Write " = " & Request.Cookies(CName)

      End IF



      Response.Write "</div>"

  Next



 %>

               

Cookies on http://sorenwinslow.com
Cookie Name: RWSESSID = 88134339ccef1354cf8ec58599a6a949
Cookie Name: Soren
Keys:
TheStyle: Flame
© 1967 - 2024 Soren Winslow