<?php 

$qryApi = mysqli_query($conn,"SELECT * FROM api_setting");
$apidata = mysqli_fetch_array($qryApi);

$apikey = $apidata['APIkey']; //email address()
$url = $apidata['baseurl'];

$host = "https://$url/api/sme-data?apikey=$apikey&service=$network&MobileNumber=$phone&DataPlan=$plan&ref=$requestId&maxamount=$debit";


//Initialize cURL.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $host);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);

 $resdata = curl_exec($ch);
$result = json_decode($resdata);

//Close the cURL handle.
curl_close($ch);




?>