<?php
// API URL where you want to send the GET request
$url = 'https://zhopper2u.com/api/balance';  // Replace with the actual URL

// Data to send in the GET request (query parameters)
$data = [
    'userid' => 'AAAA',
    'gateway' => 'CB-wallet'
];

// Build the query string from the data array
$query_string = http_build_query($data);

// Append the query string to the URL
$url_with_params = $url . '?' . $query_string;

// Initialize cURL session
$ch = curl_init();

// Set cURL options
curl_setopt($ch, CURLOPT_URL, $url_with_params);  // Use the URL with query parameters
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);    // Return the response as a string
curl_setopt($ch, CURLOPT_HTTPGET, true);           // Use GET method (this is actually the default, but it's good practice to specify it)

// Execute cURL request and get the response
$response = curl_exec($ch);

// Check for errors in cURL request
if (curl_errno($ch)) {
    echo 'Curl error: ' . curl_error($ch);
} else {
    // Output the response from the server
    echo 'Response: ' . $response;
}

// Close cURL session
curl_close($ch);
?>