hmmmm 403 I am at the office and dont have my laptop (which has CF on it) I
will whip something up.
Forget the API.js for now and just get the post working to Google. with the
correct fields
$in = @file_get_contents("
http://google.com/translate_t?langpair=".urlencode($lp)."&text=".urlencode($text
));
Is what I use in php
<CFHTTP
url="http://google.com/translate_t<http://google.com/translate_t?langpair=".urlencode($lp)."&text=".urlencode($text>"
method="GET" resolveurl="yes" throwonerror="yes" redirect="yes">
<CFHTTPPARAM type="FORMFIELD" name="langpair" value="en|es"> <!--- English
to Spanish --->
<CFHTTPPARAM type="FORMFIELD" name="text" value="Hello World">
</CFHTTP>
The result should be in CFHTTP.FileContent. Then use a regex to get it out
the Div <div id=result_box dir=ltr>(.*?)</div>
I will test when I get home
Eric Haskins
Web Application Developer
Directnic.com <http://directnic.com/> / Parked.com <http://parked.com/>
Convert your Parked Domains in revenue streams
http://www.parked.com/tour/?promo=455BD4CABB
On 6/15/07, Michael Eger <[EMAIL PROTECTED]> wrote:
>
> I tested a cfhttp approach to retrieve the text, but am getting a 403
> error saying I do not have permission. I do not want to implement a PHP
> solution for this, so I need to find another solution. Any other ideas?
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 beta â Build next generation applications today.
Free beta download on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:281329
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4