|
-
February 3rd, 2000, 09:39 AM
#1
VB and Cookies
Hi,
I'm trying to write a VB6 app that has a WebBrowser control.
I use the Webbrowser.Navigate(URL) function to connect to a web site. Cookies are enabled on my machine.
I need to get hold of the cookie that is created when I goto the web site.
Any ideas how i can get to the cookie in VB, using this control.
Cheers
Mike
-
February 3rd, 2000, 10:07 AM
#2
Re: VB and Cookies
here is a sample
option Explicit
private Sub Command1_Click()
w.navigate "http:yourURL"
End Sub
private Sub w_NavigateComplete2(byval pDisp as Object, URL as Variant)
Dim d as HTMLDocument
set d = w.document
MsgBox d.cookie
End Sub
you need to add a reference to the HTML Object Library (MSHTML.DLL) to your project to get acccess to the HTML document in your browser.
-
February 3rd, 2000, 12:15 PM
#3
Re: VB and Cookies
Thanks for the code. It seems to return a Web escaped cookie. Do you know how to unescape it??
Cheers
Mike
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|