I am attempting to use cfhttp to automate my login to another site. The login "action page" is checklogin.asp. If I cfhttp to that page using port 443 and method of post with appropriate form fields as cfhttpparam I get a connection error
<cfhttp url="https://secure.findwhat.com/accountmanagement/checklogin.asp" method="POST" port="443" resolveurl="true" useragent="Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) " timeout="30"> <cfhttpparam name="user_name" type="FORMFIELD" value="#attributes.username#"> <cfhttpparam name="password" type="FORMFIELD" value="#attributes.password#"> </cfhttp> First Question. Why do I get a connection error. If i go to that page directly in the browser it just redirects me to the login page (as I would expect since the form wasnt submitted). Increasing the timeout doesnt help and I have verified that the attributes are correct. I can work around this by grabbing the login form(login.asp not checklogin.asp) with a cfhttp (GET) , populate the form fields programatically and add js to autosubmit the form from the onloadmethod. This logs me in but of course this is only good in an interactive setting because the login doesn't occur until the page is served. My goal is to login and then move to another page within the site and grab that page via cfhttp. Any suggestions. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists