They might be setting some cookies initially and also a session id of sorts.
What you may need to do is hit their 'form' page once and capture the
cookies (just dump the cfhttp scope after an initial hit and you can find
them there - I think http-cookie scope, not sure).  Then you will need to
include those when you make the call to the form processor page.  It will
take some finagling, but you should be able to do it.

Dave

-----Original Message-----
From: Billy Cox [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 11, 2008 2:38 PM
To: CF-Talk
Subject: Submit ASP form using CFHTTP

I want to submit a zipcode to a form on another website and then manipulate
the results using cfhttp.filecontent. When I run the code below, it churns
for awhile and then gives me an ASP runtime error.
 
<cfhttp url="http://www.thesite.com/default.aspx"; resolveurl="yes"
method="post">
 <cfhttpparam name="__EVENTTARGET" value="" type="formfield" encoded="no">
 <cfhttpparam name="__EVENTARGUMENT" value="" type="formfield" encoded="no">
<cfhttpparam type="formfield" name="__VIEWSTATE"
value="/wEPDwULLTIwMjUyMTc5NjdkZA==" encoded="no">
 <cfhttpparam type="formfield" name="TxtBox" value="77083">
 <cfhttpparam type="formfield" name="Btn" value="Find">
 <cfhttpparam name="__EVENTVALIDATION"
value="/wEWBwLBnPWtDgLJr7rmBQK7v+jaBALM9PumDwKGyM+UAgLI5IvWAQLTq+asCA=="
type="formfield" encoded="no">
</cfhttp>
 
<cfoutput>#cfhttp.FileContent#</cfoutput>
 
I copied the values for  __VIEWSTATE and __EVENTVALIDATION form fields from
the 'view source', but they seem to be server-generated values aimed at
preventing what I'm trying to do. Is there any way around this?
 
I don't think that __EVENTTARGET and __EVENTARGUMENT are required.
 
 
Billy Cox
Old World Spices
[EMAIL PROTECTED]


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310889
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to