Jump to content

Iptv Jahiz

Members
  • Content count

    1
  • Joined

  • Last visited

  1. Dear Sir, I contact you to ask to help me because i get the folowing error while using the API. This is the error I got : [16-Jun-2017 19:09:49 Europe/London] PHP Warning: file_get_contents(http://my-dns.com:8000/api.php?action=user&amp;sub=create): failed to open stream: Connection refused in /home/sight/mytv/proiptv/index.php on line 26 when using this script to add new MAG user <?php $panel_url = 'http://my-dns:8000/'; $mac = '00:1A:79:79:79:79'; $bouquet_ids = 2; $expire_date = strtotime( "+1 day" ); $max_connections = 1; $reseller = 180; ############################################################################### $post_data = array( 'user_data' => array( 'mac_address' => $mac, 'expire_date' => $expire_date, 'bouquet' => $bouquet_ids , 'max_cons' => $max_connections, 'reseller' => $reseller ) ); $opts = array( 'http' => array( 'method' => 'POST', 'header' => 'Content-type: application/x-www-form-urlencoded', 'content' => http_build_query( $post_data ) ) ); $context = stream_context_create( $opts ); $api_result = json_decode( file_get_contents( $panel_url . "api.php?action=user&sub=create", false, $context ) ); print_r($api_result); ?> I inform you that i want to execute the code from website server which have IP (xx.xx.0.134) different than IPTV server (pro.leaderiptv.com). i inform you that i added the IP (xx.xx.0.134) in the Xtream Panel API setting as follow : autorised IP : xx.xx.0.134 Password API key : 7xmMWYTufgds4343T48YXaz8 I still always getting error. Please help. Thank you
×