Установлен модуль быстро редактирования в админке, наткнулся в контролере на использование cURL, сам в нем ничего не понимаю. Подскажите не передается ли никакая информация с сайта через него ? Не дает покоя) а что сделать не знаю, мб для работы модуля нужно
public function services () {
$ services = base64_decode ($ this-> config-> get ('aqe_services'));
$ response = json_decode ($ services, true);
$ force = isset ($ this-> request-> get ['force']) && (int) $ this-> request-> get ['force'];
if ($ response && isset ($ response ['expires']) && $ response ['expires']> = strtotime ("now") &&! $ force) {
$ response ['cached'] = true;
} else {
$ url = "http://www.opencart.ee/services/?eid=". EXTENSION_ID. "& информация = верно и вообще = истина";
$ hostname = (! empty ($ _ SERVER ['HTTP_HOST']))? $ _SERVER ['HTTP_HOST']: '';
if (function_exists ('curl_init')) {
$ ch = curl_init ();
curl_setopt ($ ch, CURLOPT_URL, $ url);
curl_setopt ($ ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt ($ ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt ($ ch, CURLOPT_HEADER, false);
curl_setopt ($ ch, CURLOPT_MAXREDIRS, 3);
curl_setopt ($ ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt ($ ch, CURLOPT_TIMEOUT, 60);
curl_setopt ($ ch, CURLOPT_USERAGENT, base64_encode ("curl". EXTENSION_ID));
curl_setopt ($ ch, CURLOPT_REFERER, $ hostname);
$ json = curl_exec ($ ch);
} else {
$ json = false;
}
if ($ json! == false) {
$ this-> load-> model ('setting / setting');
$ settings = $ this-> model_setting_setting-> getSetting ('aqe');
$ settings ['aqe_services'] = base64_encode ($ json);
$ this-> model_setting_setting-> editSetting ('aqe', $ settings);
$ response = json_decode ($ json, true);
} else {
$ response = array ();
}
}
$ this-> response-> addHeader ('Content-Type: application / json');
$ this-> response-> setOutput (json_enc ($ response, JSON_UNESCAPED_SLASHES));
}