Translate WordPress with GTranslate - Version 2.8.16

Version Description

  • Added option to save encoded HTML to avoid some firewall blocking
  • Updated readme to look better with the new wp.org plugin updates
  • Added link to easily navigate from widgets to plugin settings page
Download this release

Release Info

Developer edo888
Plugin Icon 128x128 Translate WordPress with GTranslate
Version 2.8.16
Comparing to
See all releases

Code changes from version 2.8.15 to 2.8.16

Files changed (4) hide show
  1. flags/16/ca.png +0 -0
  2. gtranslate.php +23 -12
  3. readme.txt +22 -11
  4. url_addon/gtranslate.php +4 -2
flags/16/ca.png CHANGED
Binary file
gtranslate.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: GTranslate
4
  Plugin URI: https://gtranslate.io/?xyz=998
5
  Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
6
- Version: 2.8.15
7
  Author: Edvard Ananyan
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
@@ -61,7 +61,7 @@ class GTranslate extends WP_Widget {
61
  $data = get_option('GTranslate');
62
  ?>
63
  <p><label><?php _e('Title', 'gtranslate'); ?>: <input name="gtranslate_title" type="text" class="widefat" value="<?php echo $data['gtranslate_title']; ?>"/></label></p>
64
- <p><?php _e('Please go to Settings -> GTranslate for configuration.', 'gtranslate'); ?></p>
65
  <?php
66
  if (isset($_POST['gtranslate_title'])){
67
  $data['gtranslate_title'] = esc_attr($_POST['gtranslate_title']);
@@ -89,12 +89,6 @@ class GTranslate extends WP_Widget {
89
  }
90
  }
91
  }
92
-
93
- // disable conflicting plugins
94
- if(get_option('googlelanguagetranslator_active', 0))
95
- update_option('googlelanguagetranslator_active', 0);
96
- if(get_option('wg_allowed', 0))
97
- update_option('wg_allowed', 0);
98
  }
99
 
100
  public static function load_textdomain() {
@@ -766,7 +760,7 @@ foreach($alt_flags as $flag)
766
  $script .= "jQuery('#alt_$flag').attr('checked', true);\n";
767
  ?>
768
 
769
- <form id="gtranslate" name="form1" method="post" class="notranslate" action="<?php echo admin_url('options-general.php?page=gtranslate_options'); ?>">
770
 
771
  <div class="postbox-container og_left_col">
772
 
@@ -1029,10 +1023,22 @@ foreach($alt_flags as $flag)
1029
  <input type="hidden" id="language_codes_order" name="language_codes" value="<?php echo $language_codes; ?>" />
1030
  <input type="hidden" id="language_codes_order2" name="language_codes2" value="<?php echo $language_codes2; ?>" />
1031
  <?php wp_nonce_field('gtranslate-save'); ?>
 
 
 
1032
  <p class="submit"><input type="submit" class="button-primary" name="save" value="<?php _e('Save Changes'); ?>" /></p>
1033
 
1034
  </div>
1035
 
 
 
 
 
 
 
 
 
 
1036
  </form>
1037
 
1038
  <div class="postbox-container og_right_col">
@@ -1056,8 +1062,8 @@ foreach($alt_flags as $flag)
1056
  <li style="margin:0;"><?php _e('Increase traffic and AdSense revenue', 'gtranslate'); ?></li>
1057
  <li style="margin:0;"><?php _e('Meta data translation', 'gtranslate'); ?></li>
1058
  <li style="margin:0;"><?php _e('Edit translations manually', 'gtranslate'); ?></li>
1059
- <li style="margin:0;"><?php _e('URL translation', 'gtranslate'); ?></li>
1060
- <li style="margin:0;"><?php _e('Language hosting', 'gtranslate'); ?></li>
1061
  <li style="margin:0;"><?php _e('Seamless updates', 'gtranslate'); ?></li>
1062
  <li style="margin:0;"><?php _e('SSL support', 'gtranslate'); ?></li>
1063
  </ul>
@@ -1155,13 +1161,18 @@ foreach($alt_flags as $flag)
1155
  $data['translation_method'] = 'onfly';
1156
  $data['widget_look'] = isset($_POST['widget_look']) ? sanitize_text_field($_POST['widget_look']) : 'flags_dropdown';
1157
  $data['flag_size'] = isset($_POST['flag_size']) ? intval($_POST['flag_size']) : '16';
1158
- $data['widget_code'] = isset($_POST['widget_code']) ? stripslashes($_POST['widget_code']) : '';
1159
  $data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array($data['default_language']);
1160
  $data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array($data['default_language']);
1161
  $data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
1162
  $data['language_codes'] = (isset($_POST['language_codes']) and !empty($_POST['language_codes'])) ? sanitize_text_field($_POST['language_codes']) : 'af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,en,et,tl,fi,fr,gl,ka,de,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi';
1163
  $data['language_codes2'] = (isset($_POST['language_codes2']) and !empty($_POST['language_codes2'])) ? sanitize_text_field($_POST['language_codes2']) : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1164
 
 
 
 
 
 
 
1165
  echo '<p style="color:red;">' . __('Changes Saved', 'gtranslate') . '</p>';
1166
  update_option('GTranslate', $data);
1167
 
3
  Plugin Name: GTranslate
4
  Plugin URI: https://gtranslate.io/?xyz=998
5
  Description: Makes your website <strong>multilingual</strong> and available to the world using Google Translate. For support visit <a href="https://wordpress.org/support/plugin/gtranslate">GTranslate Support</a>.
6
+ Version: 2.8.16
7
  Author: Edvard Ananyan
8
  Author URI: https://gtranslate.io
9
  Text Domain: gtranslate
61
  $data = get_option('GTranslate');
62
  ?>
63
  <p><label><?php _e('Title', 'gtranslate'); ?>: <input name="gtranslate_title" type="text" class="widefat" value="<?php echo $data['gtranslate_title']; ?>"/></label></p>
64
+ <p><?php _e('Please go to <a href="' . admin_url('options-general.php?page=gtranslate_options') . '">'.__('GTranslate Settings', 'gtranslate').'</a> for configuration.', 'gtranslate'); ?></p>
65
  <?php
66
  if (isset($_POST['gtranslate_title'])){
67
  $data['gtranslate_title'] = esc_attr($_POST['gtranslate_title']);
89
  }
90
  }
91
  }
 
 
 
 
 
 
92
  }
93
 
94
  public static function load_textdomain() {
760
  $script .= "jQuery('#alt_$flag').attr('checked', true);\n";
761
  ?>
762
 
763
+ <form id="gtranslate" name="form1" method="post" class="notranslate" action="<?php echo admin_url('options-general.php?page=gtranslate_options'); ?>" onsubmit="return gt_validate_form();">
764
 
765
  <div class="postbox-container og_left_col">
766
 
1023
  <input type="hidden" id="language_codes_order" name="language_codes" value="<?php echo $language_codes; ?>" />
1024
  <input type="hidden" id="language_codes_order2" name="language_codes2" value="<?php echo $language_codes2; ?>" />
1025
  <?php wp_nonce_field('gtranslate-save'); ?>
1026
+
1027
+ <p><label for="use_encoding" title="Turn this on if you are not able to Save Changes, this will help.">I have issues saving</label> <input type="checkbox" id="use_encoding" name="use_encoding" value="1" /></p>
1028
+
1029
  <p class="submit"><input type="submit" class="button-primary" name="save" value="<?php _e('Save Changes'); ?>" /></p>
1030
 
1031
  </div>
1032
 
1033
+ <script type="text/javascript">
1034
+ function gt_validate_form() {
1035
+ if(document.getElementById('use_encoding').checked)
1036
+ document.getElementById('widget_code').value = btoa(encodeURIComponent(document.getElementById('widget_code').value));
1037
+
1038
+ return true;
1039
+ }
1040
+ </script>
1041
+
1042
  </form>
1043
 
1044
  <div class="postbox-container og_right_col">
1062
  <li style="margin:0;"><?php _e('Increase traffic and AdSense revenue', 'gtranslate'); ?></li>
1063
  <li style="margin:0;"><?php _e('Meta data translation', 'gtranslate'); ?></li>
1064
  <li style="margin:0;"><?php _e('Edit translations manually', 'gtranslate'); ?></li>
1065
+ <li style="margin:0;"><?php _e('URL/slug translation', 'gtranslate'); ?></li>
1066
+ <li style="margin:0;"><?php _e('Language hosting (example.fr, example.es)', 'gtranslate'); ?></li>
1067
  <li style="margin:0;"><?php _e('Seamless updates', 'gtranslate'); ?></li>
1068
  <li style="margin:0;"><?php _e('SSL support', 'gtranslate'); ?></li>
1069
  </ul>
1161
  $data['translation_method'] = 'onfly';
1162
  $data['widget_look'] = isset($_POST['widget_look']) ? sanitize_text_field($_POST['widget_look']) : 'flags_dropdown';
1163
  $data['flag_size'] = isset($_POST['flag_size']) ? intval($_POST['flag_size']) : '16';
 
1164
  $data['incl_langs'] = (isset($_POST['incl_langs']) and is_array($_POST['incl_langs'])) ? $_POST['incl_langs'] : array($data['default_language']);
1165
  $data['fincl_langs'] = (isset($_POST['fincl_langs']) and is_array($_POST['fincl_langs'])) ? $_POST['fincl_langs'] : array($data['default_language']);
1166
  $data['alt_flags'] = (isset($_POST['alt_flags']) and is_array($_POST['alt_flags'])) ? $_POST['alt_flags'] : array();
1167
  $data['language_codes'] = (isset($_POST['language_codes']) and !empty($_POST['language_codes'])) ? sanitize_text_field($_POST['language_codes']) : 'af,sq,ar,hy,az,eu,be,bg,ca,zh-CN,zh-TW,hr,cs,da,nl,en,et,tl,fi,fr,gl,ka,de,el,ht,iw,hi,hu,is,id,ga,it,ja,ko,lv,lt,mk,ms,mt,no,fa,pl,pt,ro,ru,sr,sk,sl,es,sw,sv,th,tr,uk,ur,vi,cy,yi';
1168
  $data['language_codes2'] = (isset($_POST['language_codes2']) and !empty($_POST['language_codes2'])) ? sanitize_text_field($_POST['language_codes2']) : 'af,sq,am,ar,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-CN,zh-TW,co,hr,cs,da,nl,en,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,ja,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,ps,fa,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu';
1169
 
1170
+ if(isset($_POST['use_encoding']) and intval($_POST['use_encoding']) == 1)
1171
+ $data['widget_code'] = isset($_POST['widget_code']) ? rawurldecode(base64_decode(stripslashes($_POST['widget_code']))) : '';
1172
+ else
1173
+ $data['widget_code'] = isset($_POST['widget_code']) ? stripslashes($_POST['widget_code']) : '';
1174
+
1175
+
1176
  echo '<p style="color:red;">' . __('Changes Saved', 'gtranslate') . '</p>';
1177
  update_option('GTranslate', $data);
1178
 
readme.txt CHANGED
@@ -4,7 +4,7 @@ Author: Edvard Ananyan
4
  Tags: bilingual, multilingual, translate, translation, language, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
5
  Requires at least: 2.8
6
  Tested up to: 4.7
7
- Stable tag: 2.8.15
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://gtranslate.io/?xyz=998#pricing
@@ -23,12 +23,17 @@ Please check our [FAQ](https://gtranslate.io/?xyz=998#faq) to get quick answers.
23
 
24
  **Features**
25
 
26
- * Free Google automatic translation
27
  * Hides "Suggest better translation" pop-up
28
  * Hides Google top frame after translation
29
  * Mouse over effect
30
  * Google Analytics integration
31
  * Translates the site on the fly
 
 
 
 
 
32
  * Google language translator widget
33
  * Available styles Dropdown, Flags, Flags with dropdown, Nice dropdown with flags, Flags with language names, Flags with language codes, Language names, Language codes, Globe
34
  * Floating language selector
@@ -46,17 +51,17 @@ Please check our [FAQ](https://gtranslate.io/?xyz=998#faq) to get quick answers.
46
  * Yoast SEO compatible
47
  * WooCommerce compatible
48
  * You can have sub-directory (example.com/**es**/) or sub-domain (**es.**example.com) URL structure
49
- * URL Translation is possible (example.com/about-us &rarr; example.es/sobre-nosotros)
50
  * You can manually correct translations
51
  * In context translation interface (make corrections without loosing the context)
52
  * Meta data translation (meta keywords, meta description)
53
  * Translating schema.org microdata for better search engine appearance
54
- * Seamless updates (cloud service updated on our side - SaaS)
55
  * JSON format translation
56
  * AMP translation (Accelerated Mobile Pages translation)
57
- * Image localization
58
  * Translation Proxy (aka Translation Delivery Network)
59
- * Centralized Translation Cache
60
  * Language Hosting (**example.fr**)
61
  * Live Chat Support
62
 
@@ -75,7 +80,7 @@ Keywords: translate wordpress, wordpress translator, translate, translator, tran
75
 
76
  List of supported languages: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese (Simplified), Chinese (Traditional), Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sudanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu
77
 
78
- == Installation ==
79
 
80
  1. Upload the plugin files to the `/wp-content/plugins/gtranslate` directory, or install the plugin through the WordPress plugins screen directly.
81
  1. Activate the plugin through the 'Plugins' screen in WordPress
@@ -169,9 +174,7 @@ After that you can just configure and place the GTranslate Free widget on your s
169
  There are no server requirements! Your website can be written in any programming language and hosted on any web server.
170
 
171
  = What about updates? =
172
- Updates are done seamlessly. Since the translations are hosted on our server we take care about updates. You just use up to date service every day.
173
-
174
- If you decide to cancel during the trial period you will not be charged anything.
175
 
176
  = Do I need to pay for Google Translate API key usage? =
177
  No, we provide the automatic translations for free.
@@ -180,7 +183,9 @@ No, we provide the automatic translations for free.
180
  Yes, we have a 15 days free trial for our new customers.
181
 
182
  = Can I use it on SSL / HTTPS website? =
183
- Absolutely! By default we provide a self signed certificate, but if you want we can setup verified certificate purchased by you.
 
 
184
 
185
  = Can I exclude some parts from being translated? =
186
  Yes, you need to wrap the text you don't want to be translated with &lt;span class="notranslate"&gt;&lt;/span&gt;. You can add class="nturl" to the "a" tag if you don't want the destination URL to contain the language code.
@@ -202,9 +207,15 @@ You need to go to the language you want to edit, for instance, French: http://do
202
  4. Globe with language flags
203
  5. Flags with language names
204
  6. Flags with language codes
 
205
 
206
  == Changelog ==
207
 
 
 
 
 
 
208
  = 2.8.15 =
209
  * Fix for saving issue on GoDaddy hosting
210
  * Fix for double gziping in sub-directory URL structure when using Sucuri service
4
  Tags: bilingual, multilingual, translate, translation, language, localization, translation proxy, i18n, l10n, localisation, multilanguage, google translate
5
  Requires at least: 2.8
6
  Tested up to: 4.7
7
+ Stable tag: 2.8.16
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
  Donate link: https://gtranslate.io/?xyz=998#pricing
23
 
24
  **Features**
25
 
26
+ * Free Google automatic machine translation
27
  * Hides "Suggest better translation" pop-up
28
  * Hides Google top frame after translation
29
  * Mouse over effect
30
  * Google Analytics integration
31
  * Translates the site on the fly
32
+ * Posts and pages translation
33
+ * Categories and tags translation
34
+ * Menus and widgets translation
35
+ * Themes and plugins translation
36
+ * Right to left language support
37
  * Google language translator widget
38
  * Available styles Dropdown, Flags, Flags with dropdown, Nice dropdown with flags, Flags with language names, Flags with language codes, Language names, Language codes, Globe
39
  * Floating language selector
51
  * Yoast SEO compatible
52
  * WooCommerce compatible
53
  * You can have sub-directory (example.com/**es**/) or sub-domain (**es.**example.com) URL structure
54
+ * URL Translation aka slug translation is possible (example.com/about-us &rarr; example.es/sobre-nosotros)
55
  * You can manually correct translations
56
  * In context translation interface (make corrections without loosing the context)
57
  * Meta data translation (meta keywords, meta description)
58
  * Translating schema.org microdata for better search engine appearance
59
+ * Seamless updates (cloud service updated on our side - SaaS, you do not need to worry about backups on your side)
60
  * JSON format translation
61
  * AMP translation (Accelerated Mobile Pages translation)
62
+ * Image localization - Media translation
63
  * Translation Proxy (aka Translation Delivery Network)
64
+ * Centralized Translation Cache - We revise and improve translations over time
65
  * Language Hosting (**example.fr**)
66
  * Live Chat Support
67
 
80
 
81
  List of supported languages: Afrikaans, Albanian, Amharic, Arabic, Armenian, Azerbaijani, Basque, Belarusian, Bengali, Bosnian, Bulgarian, Catalan, Cebuano, Chichewa, Chinese (Simplified), Chinese (Traditional), Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Filipino, Finnish, French, Frisian, Galician, Georgian, German, Greek, Gujarati, Haitian Creole, Hausa, Hawaiian, Hebrew, Hindi, Hmong, Hungarian, Icelandic, Igbo, Indonesian, Irish, Italian, Japanese, Javanese, Kannada, Kazakh, Khmer, Korean, Kurdish (Kurmanji), Kyrgyz, Lao, Latin, Latvian, Lithuanian, Luxembourgish, Macedonian, Malagasy, Malay, Malayalam, Maltese, Maori, Marathi, Mongolian, Myanmar (Burmese), Nepali, Norwegian, Pashto, Persian, Polish, Portuguese, Punjabi, Romanian, Russian, Samoan, Scottish Gaelic, Serbian, Sesotho, Shona, Sindhi, Sinhala, Slovak, Slovenian, Somali, Spanish, Sudanese, Swahili, Swedish, Tajik, Tamil, Telugu, Thai, Turkish, Ukrainian, Urdu, Uzbek, Vietnamese, Welsh, Xhosa, Yiddish, Yoruba, Zulu
82
 
83
+ **Installation**
84
 
85
  1. Upload the plugin files to the `/wp-content/plugins/gtranslate` directory, or install the plugin through the WordPress plugins screen directly.
86
  1. Activate the plugin through the 'Plugins' screen in WordPress
174
  There are no server requirements! Your website can be written in any programming language and hosted on any web server.
175
 
176
  = What about updates? =
177
+ Updates are done seamlessly. Since the translations are hosted on our server we take care about updates. You just use up to date service every day. No need to worry about backups.
 
 
178
 
179
  = Do I need to pay for Google Translate API key usage? =
180
  No, we provide the automatic translations for free.
183
  Yes, we have a 15 days free trial for our new customers.
184
 
185
  = Can I use it on SSL / HTTPS website? =
186
+ Absolutely! You can use it for our free and paid versions.
187
+
188
+ Recently we have added support for Let's Encrypt certificates which are provided for free if you use sub-directory URL structure.
189
 
190
  = Can I exclude some parts from being translated? =
191
  Yes, you need to wrap the text you don't want to be translated with &lt;span class="notranslate"&gt;&lt;/span&gt;. You can add class="nturl" to the "a" tag if you don't want the destination URL to contain the language code.
207
  4. Globe with language flags
208
  5. Flags with language names
209
  6. Flags with language codes
210
+ 7. Settings page
211
 
212
  == Changelog ==
213
 
214
+ = 2.8.16 =
215
+ * Added option to save encoded HTML to avoid some firewall blocking
216
+ * Updated readme to look better with the new wp.org plugin updates
217
+ * Added link to easily navigate from widgets to plugin settings page
218
+
219
  = 2.8.15 =
220
  * Fix for saving issue on GoDaddy hosting
221
  * Fix for double gziping in sub-directory URL structure when using Sucuri service
url_addon/gtranslate.php CHANGED
@@ -69,8 +69,10 @@ $host = $glang . '.' . preg_replace('/^www\./', '', $_SERVER['HTTP_HOST']);
69
  $request_headers['Host'] = $host;
70
  $request_headers['Accept-Encoding'] = '';
71
  $request_headers['accept-encoding'] = '';
72
- if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']))
73
  $request_headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
 
 
74
  //print_r($request_headers);
75
  //exit;
76
 
@@ -92,7 +94,7 @@ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
92
  curl_setopt($ch, CURLOPT_HEADER, true);
93
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
94
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
95
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
96
 
97
  switch($_SERVER['REQUEST_METHOD']) {
98
  case 'POST': {
69
  $request_headers['Host'] = $host;
70
  $request_headers['Accept-Encoding'] = '';
71
  $request_headers['accept-encoding'] = '';
72
+ if(isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
73
  $request_headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
74
+ $request_headers['authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
75
+ }
76
  //print_r($request_headers);
77
  //exit;
78
 
94
  curl_setopt($ch, CURLOPT_HEADER, true);
95
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
96
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
97
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
98
 
99
  switch($_SERVER['REQUEST_METHOD']) {
100
  case 'POST': {