<?php
header("Content-Type: application/json; charset=UTF-8");

@ob_start();
@include('../includes/config.php'); 
@ob_clean();
$tng_apiurl=JkL_get('TheNextGenAPI','tng_apiurl');
$tng_apikey=JkL_get('TheNextGenAPI','tng_apikey');
$_M = $_GET['mobile'] ?? '';
$_X = urlencode($_M);

$_U = implode('', [
    $tng_apiurl,
    '/api/RechargeWebService/v1/mobile-reacharge-plans?apikey=',
    $tng_apikey,
    '&mobileNumber=',
    $_X
]);

$_C = curl_init($_U);
curl_setopt_array($_C, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
]);

$_R = curl_exec($_C);
$_E = curl_error($_C);
curl_close($_C);

echo $_R;
