It's fairly simple... depending on the information you want to retrieve from the cookies. The following code just lists the Internet addresses contained in the cookies stored at a certain location.
Add a list box to a form and place the following code in a command button. (Make sure the Cpath$ variable refers to the correct folder.)
[tt]
Cpath$ = "d:\windows\profiles\Alt255\cookies\"
F$ = Dir(Cpath$ & "*.txt"
Do While F$ <> ""
ff = FreeFile
Open Cpath$ & F$ For Binary As #ff
A$ = String$(LOF(ff), 32)
Get #ff, 1, A$
Close
Va = Split(A$, Chr$(10))
If UBound(Va) > 1 Then
Found = False
For Re = 1 To List1.ListCount
If Va(2) = List1.List(Re) Then
Found = True
Exit For
End If
Next
If Found = False Then List1.AddItem Va(2)
End If
F$ = Dir
Loop
[/tt]
Remember that cookies are just text files. This little sub simply gets the third line from every *.TXT file in the designated folder.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.