report on cookie contents to server

i am not sure if this would fall under javascript programming or not, any language is prefered as long as it can be done.  i want to check the contents of a cookie stored on a users pc and then report the contents of that cookie to a website that can display its info.  any ideas on how this might be accomplished
Who is Participating?
This is written in VB script also, but it's easy to convert to JavaScript...  Hope it helps.
u are looking for this :

Sub ShowCookies()
      Dim cookie, key
            For Each cookie In Request.Cookies
                  If Not Request.Cookies(cookie).HasKeys Then
                          Response.Write cookie & " = " & _
                        Request.Cookies(cookie) & "<br>"
                        For      Each key In Request.Cookies(cookie)
                              Response.Write cookie
                              Response.Write "(" & key & ")"
                              Response.Write " = "
                              Response.Write Request.Cookies(cookie)(key)
                              Response.Write "<br>" & vbCrLf
                  End If
End Sub
simongodAuthor Commented:
maybe i should expand on that i little more, when someone goes to my website i want to check that cookie on there pc and then report its contents.  i am not very good with vb, i prefer c++ or javascript.  i can understand vb and could rewrite its code into vc++ exquivelant
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

simongodAuthor Commented:
can i refer to a cookie's filename?  another website stores a cookie and thats the one that i want to reference.
Cookies are only accessible on the domain that they are created from, you cannot access other sites cookies...

For example, if you create a cookie for the domain you would not be able to access it from  This is a security mechanizim built into each browser which supports cookies.   You can however configure a cookie created a to be able to be ready by by altering the 'domain' setting of the cookie.
simongodAuthor Commented:
what if the domain is the same?  for instance, i use a free web hosting service that others can use too.  write to a cookie and another users "web site"  writes to a cookie can i access that cookies data?  we are both on the same domain, such as
Hmm... It should technically be accessible, however you would need to ensure that the 'Domain' portion of the cookie is set to only the '' namespace and the 'Path' is set to '/'.  This should potentially allow the cookie to be read from all sub-sites within GeoCities.

For further info, please see:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.