I guess this could be your problem. Since the IP address given to you is not the IP address of the host machine, it does not work with the shared hosting IP address.
Please check the ip address with the codes below (some companies show the ip address of the host machine with this code.
Throw the codes I gave in the bottom section to the server where you set up the portal.
server.php
<?php
$host= gethostname();
$ip = gethostbyname($host);
echo $ip;
?>
You can check if the api is working or not with these codes.
and change what I wrote below.
http://dnsadress: port/
$kullaniciadi = "
username
$kullanicipass = "
password";
apitest.php
<?php
function _curl($url, $data){
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => $url,
CURLOPT_USERAGENT => 'Web Panel',
CURLOPT_POST => 1,
CURLOPT_SSL_VERIFYPEER => 0,
CURLOPT_HTTPAUTH => CURLAUTH_BASIC,
CURLOPT_CONNECTTIMEOUT => 5,
CURLOPT_TIMEOUT => 3,
CURLOPT_HTTPHEADER => array('Accept: application/json'),
CURLOPT_POSTFIELDS => http_build_query($data),
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4
));
$resp = curl_exec($curl);
curl_close($curl);
return $resp;
}
define("apidir", "http://dnsadress:port/");
$expire_date = strtotime( "+1 second" );
$bouquet_ids = "";
$kullaniciadi = "username";
$kullanicipass = "password";
$post_data = array( 'username' => $kullaniciadi, 'password' => $kullanicipass );
$resp = _curl(apidir . "api.php?action=user&sub=info", $post_data);
$kullanicidata = json_decode($resp, true);
print_r($kullanicidata);
If you check testapi.php and a white screen appears, the api is not active.
When you enter valid membership information
If you see the codes starting with Array =>, it means your ap is working and the bouquets mag entry will work properly.