Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Google Translate from vb.net


Google Translate from vb.net

Author
Message
joshkrak
joshkrak
Forum God
Forum God (313 reputation)Forum God (313 reputation)Forum God (313 reputation)Forum God (313 reputation)Forum God (313 reputation)Forum God (313 reputation)Forum God (313 reputation)Forum God (313 reputation)Forum God (313 reputation)

Group: Forum Members
Posts: 1, Visits: 2
Hi everyone!



I trying to write a app to do some chinese->english translation using google. I have all the code down to generate the right URL, i.e.



http://translate.google.com/translate_t?text=%E4%BD%A0%E5%A5%BD&hl=en&langpair =zh-CN|en&tbb=1&ie=utf-8



I can paste that into a browser and it works, but when I try to request the page using msxml 6.0 I get a 403 error (forbidden). I tried requesting "www.google.com" first, thinking maybe I need a cookie, and google.com returns fine, but still when I go on to the translate url I get the 403. Is there anyway around this, maybe changing my request header?



I also tried another approach with the WebBrowser control. I had a little more success using it; the page gets returned with no 403, but, well hard to explain unless you look at this page:



http://translate.google.com/translate_t?text=%E4%BD%A0%E5%A5%BD&hl=en&langpair=zh-CN%7Cen&tbb=1&ie=utf-8



so if you put that in your browser, you see ?? (or chinese characters if you have the language pack installed) in the 'Original Text:' box, and "Hello" as the translation. However, when I use this same URL in the webbrowser control of vb.net the returned page has ?? as the 'Original Text:' and "-" as the translated text.



Now this is really making me go bonkers. Anyone tell me what is going on? I will bow down if you help me through this

Josh K.

Co-Founder/VP

www.GamerWealth.com
GO

Threaded View

Threaded View
joshkrak - 11/17/2006


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search