PDA

Click to See Complete Forum and Search --> : Change Headers via Webbrowser


ScRePt
Sep 19th, 2006, 12:17 PM
Hello all,

I'am searching for some days now for a way to change the headers sent to
a site browsed by webbrowser control.

a full header sent by IE on XP is something like that :

Connection: Keep-Alive Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */* Accept-Encoding: gzip, deflate Accept-Language: el Cookie: Date=9/18/2006; Privacy.net=Privacy+Analysis Host: network-tools.com User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

-i dont want to change the registry
-i dont want to start making a browser from scratch, so i must use
webbrowser

Thanks in advance

litlewiki
Sep 20th, 2006, 06:26 AM
strHeader = "Content-Type: application/x-www-form-urlencoded" & vbCrLf & "Content-Length: " & Len(strPostData) & vbCrLf

'Post the data
web.Navigate2 "Website", 0, "", varPostData, strHeader



varpost is your postdata that you want to sent to the server in bytes

ScRePt
Sep 20th, 2006, 09:45 AM
... I can't believe it was right there in front of me and didn't give it a shot !

(MSDN says about Additional headers, so I thought they wouldn't overwrite
the original ones.
I just got to lazy to try before I post.
Thanks for your time)