In the previous example, we read the value of one cookie from the server. Now we’ll see how to write a script that reads all the cookies that came from your server and displays their names and values. If there are no cookies, the script says, “There are no cookies here” (Figure 10.3). If there are cookies, it displays a line per cookie showing what’s in the cookie (Figure 10.4). Script 10.5 shows you how.
To show all your cookies:
18.117.156.113