<?php echo "Starting translation test G API V1<br/>\n"; $connection = curl_init(); curl_setopt($connection, CURLOPT_URL, 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&format=html&langpair=en|pl&q=welcome'); curl_setopt($connection, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)'); //curl_setopt($connection, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($connection); echo 'Test result: '.$result."<br/>\n"; echo 'Test error: '.curl_error($connection)."<br/>\n"; curl_close($connection); ?>
開始翻訳テストG API V1
テスト結果:{"ResponseDataを":ヌル、"responseDetails":"サービスの悪用の疑いのある利用規約をhttp://code.google.com/apis/errors参照してください。"、"は、responseStatus":403}
テストのエラー: