From b9681a81ce21e8b98a10896c1b34559e575588bb Mon Sep 17 00:00:00 2001 From: filip Date: Sun, 30 Nov 2014 17:25:09 +0100 Subject: use file_get_contents as it seems that libcurl is not installed on site ;) --- langs/report_tx_git.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'langs/report_tx_git.php') diff --git a/langs/report_tx_git.php b/langs/report_tx_git.php index 29aee5eae..829f72f16 100644 --- a/langs/report_tx_git.php +++ b/langs/report_tx_git.php @@ -51,23 +51,28 @@ $resource_type = 'Webpages'; // Webpages, Documentation, Cauldron function tx_call($tx_request, $project = 'project/mageia/') { global $errors; - $tx_url_prefix = "http://www.transifex.com/api/2/"; + $tx_url_prefix = "www.transifex.com/api/2/"; $tx_url = $tx_url_prefix . $project . $tx_request; + $user = "filip_mageia"; + $pass = "report"; +/* // create a new cURL resource $curl_handle = curl_init(); // TX username and password - curl_setopt($curl_handle, CURLOPT_USERPWD, "filip_mageia:report"); + curl_setopt($curl_handle, CURLOPT_USERPWD, "$user:$pass"); // return, do not echo curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, TRUE); // pass url - curl_setopt($curl_handle, CURLOPT_URL, $tx_url); + curl_setopt($curl_handle, CURLOPT_URL, "http://$tx_url"); $tx_result = curl_exec($curl_handle); curl_close($curl_handle); +/**/ + $tx_result = file_get_contents("http://$user:$pass@$tx_url"); $tx_result_array = json_decode($tx_result, TRUE); $json_last_error = json_last_error(); -- cgit v1.2.1