php-google-translate-free icon indicating copy to clipboard operation
php-google-translate-free copied to clipboard

Google detected unusual traffic from your computer network, try again later (2 - 48 hours)

Open carlosvaldesweb opened this issue 3 years ago • 3 comments

Hello, i've doing around of 30 requests, but now Google return me that.

"Google detected unusual traffic from your computer network, try again later (2 - 48 hours)""

Exists a way to evade this limitation?

I'm seeing that in the repository you have "Eliminates IP request limitations" should i to do something for the ip limitation?

carlosvaldesweb avatar May 04 '21 23:05 carlosvaldesweb

I have the same issue, I don't know why. Someone has an idea ?

Jerome-W-90 avatar Jun 01 '21 18:06 Jerome-W-90

I have the same issue. Please help.

shmateyev avatar Jun 08 '21 10:06 shmateyev

There is nothing you can do, the only thing you can do to avoid this problem is to change the server's IP or use a proxy to change your IP.

It is not a problem with this package, the problem comes from google, that you are trying to use its services in an "illegal" way, that's why it blocks your IP.

If you're using in your company, contact your boss to use Google Cloud Translate, if I'm not mistaken it's $20 per million characters.

Also, what do you have to know, that if you use this package, you are limited to 5000 characters

In my case, I use 3 things, database, this package, and Google Cloud Translate.

First I check in the database if there is a cached translation, if there is not I use this package to translate, in case of error I use Google Cloud Translate.

In case you want to use Google Cloud Translate, it is really easy, you have to obtain a key and with the following code you can translate

$translate = new Google\Cloud\Translate\V2\TranslateClient([
    'key' => $key
]);

$text_translated = $translate->translate($text, [
       'source' => $from,
       'target' => $to
])['text']

I've tried looking for free alternatives, but haven't found anything.

EDIT: Checking the prices of Google Cloud Translate, having $10 in the account, the first 500,000 characters per month are free, then you have to pay $20 per million characters and if you are not a client, they give you $300.

In my opinion, it is a good alternative, it is really cheap, and if you translate little, you will not have to make any payment, as long as you do not exceed 500,000 characters per month.

More info: https://cloud.google.com/translate/pricing

mcolominas avatar Nov 25 '21 20:11 mcolominas