* use curl as alternative option for reporting install

This commit is contained in:
slawkens
2019-04-19 21:55:22 +02:00
parent 946e8a9011
commit f10169c603

View File

@@ -123,8 +123,17 @@ else {
));
if(!isset($_SESSION['installed'])) {
if(ini_get('allow_url_fopen') ) {
file_get_contents('http://my-aac.org/report_install.php?v=' . MYAAC_VERSION . '&b=' . urlencode(BASE_URL));
$report_url = 'http://my-aac.org/report_install.php?v=' . MYAAC_VERSION . '&b=' . urlencode(BASE_URL);
if (function_exists('curl_version'))
{
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $report_url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_exec($curl);
curl_close($curl);
}
else if (ini_get('allow_url_fopen') ) {
file_get_contents($report_url);
}
$_SESSION['installed'] = true;
}