aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report_tx_git.php
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2014-11-30 17:25:09 +0100
committerfilip <filip.komar@gmail.com>2014-11-30 17:25:09 +0100
commitb9681a81ce21e8b98a10896c1b34559e575588bb (patch)
treed55825b22c1e9abd12828ce5e3cfd773607bb10a /langs/report_tx_git.php
parent070c7f127bc814ad6123df4d643df2e50b907886 (diff)
downloadwww-b9681a81ce21e8b98a10896c1b34559e575588bb.tar
www-b9681a81ce21e8b98a10896c1b34559e575588bb.tar.gz
www-b9681a81ce21e8b98a10896c1b34559e575588bb.tar.bz2
www-b9681a81ce21e8b98a10896c1b34559e575588bb.tar.xz
www-b9681a81ce21e8b98a10896c1b34559e575588bb.zip
use file_get_contents as it seems that libcurl is not installed on site ;)
Diffstat (limited to 'langs/report_tx_git.php')
-rw-r--r--langs/report_tx_git.php11
1 files changed, 8 insertions, 3 deletions
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();