Closed kamyargerami closed 5 years ago
same with me
Anybody can provide quick help here?
I used yesterday and it's working. Maybe you are encounter a ban problem. I recommend you use the proxies option:
$tr = new GoogleTranslate($target, $source, [ 'timeout' => 10, 'proxy' => [ 'http' => 'tcp://0.0.0.0:8080', 'http' => 'tcp://0.0.0.0:3123'//..add more if you wish ], 'headers' => [ 'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36' ] ]); return $tr->translate($text);
Hope this help
@MuscledGeek
[...] 'proxy' => [ 'http' => 'tcp://0.0.0.0:8080', 'http' => 'tcp://0.0.0.0:3123'//..add more if you wish ], [...]
This is WRONG, this is NOT how you set up proxies. Declaring an array like this is not even valid in PHP (you have a duplicate array key for 'http'). Please follow the example on the main page.
Also, this issue is a duplicate of #112 and that bug has been fixed in #109 (version v4.0.2). Make sure you are using the latest version of this library.
I can confirm that the latest version is working right now.
hi i get this error today from the lumen
Client error:
POST https://translate.google.com/translate_a/single?client=t&hl=en&dt=t&dt=bd&dt=at&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&sl=en&tl=fa&ie=UTF-8&oe=UTF-8&multires=1&otf=0&pc=1&trs=1&ssel=0&tsel=0&kc=1&tk=725373.860675
resulted in a400 Bad Request
response: <!DOCTYPE html><meta name=viewport content="initial-scale=1, minimum-scale=1, width=de (truncated...)and it's no longer working