How to use google input tools in my website

1k Views Asked by At

I had find the code from this link

and having same code but it's not working. It's saying me

The page at 'https://suryaprakashanmandir.com/something.php'was loaded over HTTPS, but requested an insecure script 'http://www.google.com/inputtools/request?text=hello&ime=transliteration_en_ml&num=5&cp=0&cs=0&ie=utf-8&oe=utf-8&app=jsapi&uv&cb=_callbacks_._0k5mbnkfb'. This request has been blocked; the content must be served over HTTPS.

My full code of something.php is like:-

<script type="text/javascript" src="https://www.google.com/jsapi">
</script>
<script type="text/javascript">

  // Load the Google Transliterate API
  google.load("elements", "1", {
        packages: "transliteration"
      });

  function onLoad() {
    var options = {
        sourceLanguage:
            google.elements.transliteration.LanguageCode.ENGLISH,
        destinationLanguage:
            [google.elements.transliteration.LanguageCode.HINDI],
        shortcutKey: 'ctrl+g',
        transliterationEnabled: true
    };

    // Create an instance on TransliterationControl with the required
    // options.
    var control =
        new google.elements.transliteration.TransliterationControl(options);

    // Enable transliteration in the textbox with id
    // 'transliterateTextarea'.
    control.makeTransliteratable(['transliterateTextarea']);
  }
  google.setOnLoadCallback(onLoad);
</script>
<textarea id="transliterateTextarea" style="width:600px;height:200px"></textarea>

I have a .htaccess file in my root folder like

RewriteEngine On
RewriteCond %{HTTP_HOST} ^suryaprakashanmandir\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.suryaprakashanmandir.com/$1 [R,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

0

There are 0 best solutions below