Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21340

[RESOLVED] Send a header with cookie using xmlhttp

$
0
0
Hello
I want to send a header (GET) containing cookies returned by a previous GET header.
First header:
Code:

http://mymodel.blogfa.com/comments/?blogid=mymodel&postid=17&timezone=12600

GET /comments/?blogid=mymodel&postid=17&timezone=12600 HTTP/1.1
Host: mymodel.blogfa.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: cid=66b7c9b93ddf47af9ba4f689bd6c8805; ctm=63525717144
Connection: keep-alive

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
Set-Cookie: cid=66b7c9b93ddf47af9ba4f689bd6c8805; domain=blogfa.com; expires=Wed, 19-Feb-2014 10:16:54 GMT; path=/
Set-Cookie: ctm=63525723414; domain=blogfa.com; expires=Wed, 19-Feb-2014 10:16:54 GMT; path=/
X-Powered-By: ASP.NET
Date: Sun, 19 Jan 2014 10:16:54 GMT
Content-Length: 2206

Second header:
Code:

http://mymodel.blogfa.com/comments/?blogid=mymodel&postid=17&timezone=12600

GET /comments/?blogid=mymodel&postid=17&timezone=12600 HTTP/1.1
Host: mymodel.blogfa.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: cid=66b7c9b93ddf47af9ba4f689bd6c8805; ctm=63525717144
Connection: keep-alive

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
Set-Cookie: cid=66b7c9b93ddf47af9ba4f689bd6c8805; domain=blogfa.com; expires=Wed, 19-Feb-2014 10:16:54 GMT; path=/
Set-Cookie: ctm=63525723414; domain=blogfa.com; expires=Wed, 19-Feb-2014 10:16:54 GMT; path=/
X-Powered-By: ASP.NET
Date: Sun, 19 Jan 2014 10:16:54 GMT
Content-Length: 2206

These headers are extracted by "Live HTTP headers" addon of firefox.

The first header loads the page.
The second one loads an image.
If the second header doesn't contain the cookie the image won't be shown.
Now I want to load page (first header) and then extract the cooke.
Then use the extracted cookie in the next header to receive the image.
And at last show the received image in a picturebox.

Viewing all articles
Browse latest Browse all 21340

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>