Dim q As String = "apple"
Dim from As String = "en"
Dim [To] As String = "zh"
Dim appId As String = "2015063000000001"
Dim rd As Random = New Random()
Dim salt As String = Rand.Next(100000).ToString()
Dim secretKey As String = "12345678"
Dim sign As String = EncryptString(appId & q & salt & secretKey)
Dim url As String = "http://api.fanyi.baidu.com/api/trans/vip/translate"
Dim hc As New HttpClient(url )
hc.ContentType = "application/x-www-form-urlencoded"
hc.FormData.Add("q",UrlEncode(q))
hc.FormData.Add("from",from)
hc.FormData.Add("to",[To])
hc.FormData.Add("appid",appid)
hc.FormData.Add("salt",salt)
hc.FormData.Add("sign",sign)
hc.Timeout = 6000
Dim ret As String = hc.GetData
msgbox(ret)