Thanks all for the replies. I'll have to look into this further. I've used
CFHTTP to get data but didn't think I could use it to push data.

I'll test it out and see how it works. Thanks all for the hints. I knew --
or thought I knew it could be done (after all blog spammers do this
everyday) but didn't realize that it was this simple. 

Thx




-----Original Message-----
From: Jeff Price [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 27, 2008 7:30 AM
To: CF-Talk
Subject: Re: auto-fill forms, a B2B application

Gill, CFHTTP and CFHTTPPARAM makes this very easy and fairly painless.

The biggest gotchas are that you'll need to make sure you identify and pass
all the form data including hidden fields, url parameters and submit button
values.

You'll need to handle any errors in the process (either their server not
responding or your data being invalid and rejected).

The other gotcha is that you are responsible for handling session
information, whether it is through url tokens or cookies you'll have to
figure out what those are and then pass them with CFHTTPPARAM on each
request.

Another consideration you have to worry about is this could be a fairly
lengthy processing time especially if the third party site is slow, or the
process lengthy.

Good luck!
-jeff

Here is an example:
<cfhttp url="#myURL#" method="POST" useragent="#CGI.HTTP_USER_AGENT#">
        <cfhttpparam type="FormField" name="fstatus" value="all">
        <cfhttpparam type="FormField" name="tab" value="tickets">
        <cfhttpparam type="FormField" name="view" value="main">
        <cfhttpparam type="FormField" name="staff_username"
value="#attributes.username#">
        <cfhttpparam type="FormField" name="staff_password"
value="#attributespassword#">
        <cfhttpparam type="FormField" name="act" value="Login">
        <cfhttpparam type="FormField" name="login" value="Login">
        <!--- this spits back the cookies I had grabbed from a previous
request and handle session --->
        <cfloop from="1" to="#arrayLen(cookies)#" step="1" index="i">
                <cfhttpparam type="Cookie" name="#cookies[i].NAME#"
value="#cookies[i].VALUE#" >
        </cfloop>
</cfhttp>


>So the third party site will have to be contacted, go through a login
screen
>and fill-out data over multiple screens. 
>
>I don't see how this can be done, but what do I know? Can it be done? 
>
>Gil 



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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299947
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