I am trying to automate page downloads from an online catalog
site. Unfortunately the site requires a login first. I am trying to
automate the login process by submitting all the form fields via
cfhttp, but apparently the site is unable to set cookies to the
coldfusion browser. Below is the code i am using to access the
page, but I get errors back saying my browser is not able to accept
cookies. I tried changing the useragent value of the cfhttp tag but
to no avail. I also tried sending the entire contents of the cookie
fgile that gets put on my machine when I log in manually and
sending it as a cfhttpparam type="cookie". I gave that param the
same name as the text file and copied the entire contents of the
file to the value attribute. still no luck. any ideas are
It is possible, but you have to track all cookies, including
those that are set between redirects, if any. This is why, you
cannot use redirect="yes", but have to process redirects
explicitly. There might be already [needed] cookies set by the form
displaying page. Of course, you have to follow all rules for
cookies, track, store, and set them, as needed. There is no such
thing, as "Cold Fusion Browser" - you have to emulate a "browser"
on your own.
Alternatively, you can use
instead of CFHTTP. This tag handles those issues for you. However,
it is only for Windows.