<?

function http_get_curl($url, $get_variables_array, $get_values_array)
{
    $get_variables_array[] = 'username';
    $get_variables_array[] = 'password';
    $get_values_array[] = 'MUX01';
    $get_values_array[] = 'MUX01!@';
    $index = 0;
    $get_vars = "?";
    foreach ($get_variables_array as $variables) {
        $get_vars = $get_vars . $variables . "=" . $get_values_array[$index] . "&";
        $index++;
    }

    $url = $url . $get_vars;
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    $resp = curl_exec($curl);
    curl_close($curl);

    return $resp;
}

$responce = http_get_curl("api.elegantwork.co.za/fuel/inter_site_com.php", ['get_transaction_details', 'tran_id'], ['', $_GET['tran_id']]);

echo $responce;
