Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

PiwikTracker: curl support #1574

Closed
anonymous-piwik-user opened this Issue · 4 comments

2 participants

Anonymous Piwik user Anthon Pang
Anonymous Piwik user

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

Bugfix:
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

Anthon Pang
Collaborator

(In [2910]) fixes #1574

Anthon Pang
Collaborator

(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.