安庆小程序开发价格_获取IE浏览器Cookie信息的方

获取IE浏览器Cookie信息的方法     投稿:jingxian   下面小编就为大家带来一篇获取IE浏览器Cookie信息的方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧

很多人不知道如何去获取IE浏览器中的Cookie信息,GetCookie这个API就可以获得了。

Private Declare GetCookie Lib ".dll" Alias "GetCookieA" (ByVal l凡科抠图zUrlName As String, ByVal l凡科抠图zCookieName As String, ByVal l凡科抠图zCookieData As String, lpdwSize As Long) As Boolean

这个域名之下的Cookie信息可以这么写:

Dim buffer As String * GetCookie("p>

获取结果:

获取到的Cookie信息如下: bdshare_firstime=26; sug=3; sugstore=1; BD_TMP_CK=true; BAIDUID=F1F6DA77AD0E469EEF3301C98F1CB0A1:FG=1; cflag=65535%3A1; BAIDU_WISE_UID=wapp_27_907; locale=zh; bdime=0; NBID=D3EEB391CF4DCDA2ED0B6035E872886D:FG=1

Private Const INTERNET_COOKIE_HTTPONLY As Integer = 8192Private Declare GetCookieEx Lib ".dll" Alias "GetCookieExA" (ByVal url As String, ByVal cookieName As String, ByVal cookieData As String, ByRef size As Integer, ByVal flags As Integer, ByVal pReserved As Long) As Boolean

调用方式也差不多:

Dim buffer As String * GetCookieEx("p>

获取结果:

获取到的Cookie信息如下: bdshare_firstime=26; sug=3; sugstore=1; BD_TMP_CK=true; BAIDUID=F1F6DA77AD0E469EEF3301C98F1CB0A1:FG=1; cflag=65535%3A1; BAIDU_WISE_UID=wapp_27_907; locale=zh; bdime=0; NBID=D3EEB391CF4DCDA2ED0B6035E872886D:FG=1; BDUSS=EdwblA4akE5NjV-N3RPZFdjcW52VkJQQXBvbXhRMm5PaEXucy05am1MYkdjY0pTQVFBQUFBJCQAAAAAAAAAAAEAAAXDmn4UdDJubgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMbkmlLS5JpSe

这两个API各有优缺点,具体使用哪个得看具体情况选择了。

以上这篇获取IE浏览器Cookie信息的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持凡科。