Skip to content


PiwikTracker: curl support #1574

anonymous-piwik-user opened this Issue · 4 comments

2 participants


PiwikTracker not working on many shared hosting server, because external file_get_contents($url) not working with allow_url_fopen = false.

-> Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /xxxx/.xxxx/xxxx/index.php on line xx

Now using Curl

Line 292....

        if(function_exists('curl_open')) {
            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, $url);
            curl_setopt($ch, CURLOPT_TIMEOUT, 8);
            curl_setopt($ch, CURLOPT_HEADER, 0);
            $response = curl_exec ($ch);
        } else {
            $response = file_get_contents($url, 0, $ctx);

Keywords: tracker api


(In [2910]) fixes #1574


(In [2911]) refs #1574

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.