Get WebPage that need a cookie.

How do I retrieve a page (with delphi) that needs a cookie? I need this to make programs that automatically get new email status.

thanks in advance.
LVL 1
dyancerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
GloomyFriarConnect With a Mentor Commented:
You need to send your cookies in the html header:

"Set-Cookie: B=5; A=4;\r\n"
0
 
GloomyFriarCommented:
Ooops. Sorry. "Set-cookie" you can receive from server.

To set cookies in request you need to send to server something like that:

GET /100.xhtml?www.alonewolfsoft.narod.ru/SOFT/gchn.rar HTTP/1.1
Host: narod.yandex.ru
Accept: */*
Referer: http://download.ru/russian/sp/13413.htm
Cookie: yandexuid=1803220281066827206
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
0
 
Eddie ShipmanConnect With a Mentor All-around developerCommented:
Your cookie, being as it is fromn an email server, may not always be the same. What you should do
is login using idHTTP and catch the cookie with a idCookieManager and then send it along with
your response. I don't have time to build an example for you but that is how I would do it.
0
All Courses

From novice to tech pro — start learning today.