Re: Submit ASP form using CFHTTP

2008-08-12 Thread Gerald Guido
Dump out the responseHeader to see if any cookies are being set.



You can see the cookie(s) using this:


 #cfhttp.responseHeader["Set-Cookie"]#



On Mon, Aug 11, 2008 at 3:38 PM, Billy Cox <[EMAIL PROTECTED]> wrote:

> 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.
>
> http://www.thesite.com/default.aspx"; resolveurl="yes"
> method="post">
>  
>   encoded="no">
>  value="/wEPDwULLTIwMjUyMTc5NjdkZA==" encoded="no">
>  
>  
>   value="/wEWBwLBnPWtDgLJr7rmBQK7v+jaBALM9PumDwKGyM+UAgLI5IvWAQLTq+asCA=="
> type="formfield" encoded="no">
> 
>
> #cfhttp.FileContent#
>
> 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:310894
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Submit ASP form using CFHTTP

2008-08-12 Thread Matthew Small
You can't pass these values directly... think of it as a series of steps.  
Request the page, parse out the necessary information (viewstate, event 
validation), pass them into the next request.  

Get a fiddler trace of an actual request that you make in a browser, and use 
the event target, event argument values from that trace to pass in your second 
request.



>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.
> 
>http://www.thesite.com/default.aspx"; resolveurl="yes"
>method="post">
> 
> 
>value="/wEPDwULLTIwMjUyMTc5NjdkZA==" encoded="no">
> 
> 
> value="/wEWBwLBnPWtDgLJr7rmBQK7v+jaBALM9PumDwKGyM+UAgLI5IvWAQLTq+asCA=="
>type="formfield" encoded="no">
>
> 
>#cfhttp.FileContent#
> 
>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:310892
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Submit ASP form using CFHTTP

2008-08-12 Thread Dave Phillips
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.
 
http://www.thesite.com/default.aspx"; resolveurl="yes"
method="post">
 
 

 
 
 

 
#cfhttp.FileContent#
 
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