Welcome to World of IPTV

With

+23k members
+11k threads
+106k posts

we are the most popular IPTV community on the web. 

IMPORTANT NOTE:
WE HAVE RECENTLY NOTICED THAT TOO MANY DOUBLE FAKE ACCOUNTS ARE CREATED IN THE PAST.
TO PREVENT THIS ISSUE THE DECISION WAS MADE THAT IN THE FUTURE A ANNUALLY FEE 20 EURO WILL BE RAISED FOR NEW MEMBERSHIPS.

Join now to the World of IPTV

Forum Rules

Before you start, check out the forum rules first

Account upgrade

Upgrade your account to get access to full features

Advertising

Would you like to place your advertisement with us ?

Resources Manager

Hundreds of IPTV scripts and apps are available for download

Extend API Functionality - Create & Restart Streams on Xtream 2.x - Player API on 1.6x

Clickbait

Extended Member
Ext. Member
Joined
Sep 22, 2019
Messages
21
Reaction score
133
Points
39
Location
Germany
Due to Xtream Codes going down, I'd imagine a lot of people wanting to migrate to the cracked Xtream Codes 1.6 panel. Doing this will remove the player_api.php functionality as it was not implemented until 2.x, so I've written a quick and dirty wrapper to replicate the functionality. It's a start, with more to be implemented later. Currently the WHMCS Web TV Player works as well as the GSE IPTV android app. Many more android apps want to work too, but some reason why I'm trying to figure that out.

In addition to this, if people decide to stay on 2x, I've written a quick wrapper to allow continuation of service during the Xtream Codes downtime by giving panel admins the ability to restart their broken streams with new sources, or create new streams and run them. You still have to have some database knowledge as it requires going into the database and amending the `stream_source`, or creating a new stream in the `streams` table. The PHP files' only purpose at the moment is to force Xtream Codes to analyse the new source, and restart the stream accordingly. Or start the new stream if it can't find it in the database.

I've tested it with my panel that I installed today, as it turns out the license server is completely down so it's possible to install it without a license check. I then added users manually, as well as bouquet's etc, then added a stream and played around with the database until I got XC to start the stream finally. Then I wrote this wrapper to automate that part of the process.

From here I'm going to write an admin panel that will list all current streams, bouquets etc, and allow editing from a user interface. Thought I'd throw this out here now though so people can continue service until the admin interface is complete or someone else brings something to the table.

XTREAM CODES 2.x

Current Functionality


  • Restart existing stream.
  • Start new stream.
How to Use

  • Place the php file here: /home/xtreamcodes/iptv_xtream_codes/wwwdir/includes/restart_stream.php
  • Edit the MySQL connection details and authorisation password in the php file. Save it.
  • Run the script: http://IPADDRESS:pORT/includes/restart_stream.php?auth=PASSWORD&id=STREAM_ID
Create a Stream

  • Enter the MySQL database.
  • Create a new stream under the streams table.
  • Add the stream_id to the relevant bouquet in the bouquets table.
  • Run the script to analyse the stream and start it.
Change a Stream Source

  • Enter the MySQL database.
  • Find your stream in the streams table.
  • Edit the stream_source column with your new sources. List format, URL encoded. E.g. ["http://website.com/source.m3u8"]
  • Run the script to analyse the stream and restart it with the new sources.
Restart a Stream

  • Run the script to restart a stream. No changes to the database required.
Future Plans

  • Full Admin UI interface. Either written from scratch or ported from Xtream Codes 1.6x.
  • Full stream control (create, restart, stop, delete, ban, unban).
  • Full user control, bouquet management, mag users, enigma, timeshift, settings etc.

URL: gtaman92/XtreamCodes2API


XTREAM CODES 1.6x

Replacing panel_api.php is optional, it's just slightly different in 2.0x. Nginx config replacement is necessary to allow CORS on web player.

FEATURES

  • Decoded Xtream Codes 2x API backported to 1.6x
  • Live TV, EPG and VOD functionality reimplemented
  • CORS implementation in NGINX
LIMITATIONS

  • No TV Series support in 1.6x
  • No catchup support in 1.6x
FUTURE PLANS

  • Implement TV Series support manually
INSTALLATION

  • Just extract the files to / home / xtreamcodes / iptv_xtream_codes and overwrite. Backup your old files!

Files available at: gtaman92 / XtreamCodesExtendAPI

Source: gtaman92 / https://www.digital-eliteboard.com/...tart-streams-on-2x-player-api-on-1-6x.481061/
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

powershell

Extended Member
Ext. Member
Joined
Sep 19, 2019
Messages
20
Reaction score
19
Points
14
Location
Switzerland
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

colinh1213

Extended Member
Ext. Member
Joined
Sep 22, 2019
Messages
23
Reaction score
27
Points
24
Location
rangers1213
heres 1 for you i did have some directs on xc , i've got the stream folder on pc (only part that survive a failed bodged back up ) , now if i add the contents of that to the stream folder on streaminy do you think the system will read and show them . so i can get the urls from them , no i didn't have the urls backed up btw .
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

extacy

Extended Member
Ext. Member
Joined
Sep 19, 2019
Messages
166
Reaction score
431
Points
74
Location
France
Has a little bug. You must remove line of 81 from panel_api. Later it will work.
PHP:
<?php
require "./includes/extend.php";

ini_set("memory_limit", -1);
if (!empty(ipTV_lib::$request["username"]) && !empty(ipTV_lib::$request["password"])) {
    $valid_actions = array("get_epg");
    $username = ipTV_lib::$request["username"];
    $password = ipTV_lib::$request["password"];
    $action = (!empty(ipTV_lib::$request["action"]) && in_array(ipTV_lib::$request["action"], $valid_actions) ? ipTV_lib::$request["action"] : "");
    $output = array();
    $output["user_info"] = array();

    if ($result = ipTV_Stream::GetUserInfo(NULL, $username, $password, true, true, true)) {
        switch ($action) {
        case "get_epg":
            if (!empty(ipTV_lib::$request["stream_id"]) && (is_null($result["exp_date"]) || (time() < $result["exp_date"]))) {
                $stream_id = intval(ipTV_lib::$request["stream_id"]);
                $from_now = (!empty(ipTV_lib::$request["from_now"]) && (0 < ipTV_lib::$request["from_now"]) ? true : false);
                $EPGs = GetEPGStream($stream_id, $from_now);
                echo json_encode($EPGs);
                exit();
            }
            else {
                echo json_encode(array());
                exit();
            }

            break;

        default:
            $categories = GetCategories();
            $url = (empty(ipTV_lib::$StreamingServers[SERVER_ID]["domain_name"]) ? ipTV_lib::$StreamingServers[SERVER_ID]["server_ip"] : ipTV_lib::$StreamingServers[SERVER_ID]["domain_name"]);
            $output["server_info"] = array("url" => $url, "port" => $_SERVER["SERVER_PORT"]);
            $output["user_info"]["username"] = $result["username"];
            $output["user_info"]["password"] = $result["password"];
            $output["user_info"]["auth"] = 1;

            if ($result["admin_enabled"] == 0) {
                $output["user_info"]["status"] = "Banned";
            }
            else if ($result["enabled"] == 0) {
                $output["user_info"]["status"] = "Disabled";
            }
            else {
                if (is_null($result["exp_date"]) || (time() < $result["exp_date"])) {
                    $output["user_info"]["status"] = "Active";
                }
                else {
                    $output["user_info"]["status"] = "Expired";
                }
            }

            $output["user_info"]["exp_date"] = $result["exp_date"];
            $output["user_info"]["is_trial"] = $result["is_trial"];
            $output["user_info"]["active_cons"] = $result["active_cons"];
            $output["user_info"]["created_at"] = $result["created_at"];
            $output["user_info"]["max_connections"] = $result["max_connections"];
            $output["user_info"]["allowed_output_formats"] = array_keys($result["output_formats"]);
            $output["available_channels"] = array();
            $live_num = $movie_num = 0;

            foreach ($result["channels"] as $channel ) {
                if ($channel["live"] == 1) {
                    $live_num++;
                    $stream_icon = $channel["stream_icon"];
                }
                else {
                    $movie_num++;
                    list() = json_decode($channel["movie_propeties"], true);
                }

                $output["available_channels"][$channel["id"]] = array("num" => $channel["live"] == 1 ? $live_num : $movie_num, "name" => $channel["stream_display_name"], "stream_type" => $channel["type_key"], "type_name" => $channel["type_name"], "stream_id" => $channel["id"], "stream_icon" => $stream_icon, "epg_channel_id" => $channel["channel_id"], "added" => $channel["added"], "category_id" => $channel["category_id"], "category_name" => $channel["category_name"], "category_parent_id" => !empty($channel["category_id"]) && !empty($categories[$channel["category_id"]]["parent_id"]) ? $categories[$channel["category_id"]]["parent_id"] : NULL, "series_no" => !empty($channel["series_no"]) ? $channel["series_no"] : NULL, "direct_source" => $channel["direct_source"], "direct_source_url" => $channel["direct_source"] == 1 ? json_decode($channel["stream_source"], true)[0] : "", "live" => $channel["live"], "container_extension" => $channel["container_extension"], "custom_sid" => $channel["custom_sid"]);
            }
        }
    }
    else {
        $output["user_info"]["auth"] = 0;}
    }

    echo json_encode($output);

?>
 

Eddiebo

Extended Member
Ext. Member
Joined
Sep 23, 2019
Messages
106
Reaction score
53
Points
39
Location
Uk
remove only line 81 or copy and use script above?

also been meaning later it will work does it take while to come through?
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

castaway

Extended Member
Ext. Member
Joined
Sep 24, 2019
Messages
30
Reaction score
88
Points
29
Location
Barsoom
on line 77 in panel_api.php you need to remove closing curly bracket at the end of the line, then php will not throw syntax error
so line 77 should look like this:
$output["user_info"]["auth"] = 0;
 
Channels MatchTime Unblock CDN Offshore Server Contact
100 cnx / 90€ 5Gbps / 180€ 48CPU-256GRAM 10Gbps 569€ Skype live:giefsl
500 cnx / 350€ 10Gbps / 350€ 48CPU-128GRAM 5Gbps / 349€ TG @changglobize
1000 cnx / 500€ 20Gbps / 700€ 40CPU-128GRAM 20Gbps / €980 http://coronaserver.com

Eddiebo

Extended Member
Ext. Member
Joined
Sep 23, 2019
Messages
106
Reaction score
53
Points
39
Location
Uk
on line 77 in panel_api.php you need to remove closing curly bracket at the end of the line, then php will not throw syntax error
so line 77 should look like this:
$output["user_info"]["auth"] = 0;
still not working which api script above are you using ?
 
shape1
shape2
shape3
shape4
shape5
shape6
Top
AdBlock Detected

We know, ad-blocking software do a great job at blocking ads. But our site is sponsored by advertising. 

For the best possible site experience please take a moment to disable your AdBlocker.
You can create a Account with us or if you already have account, you can prefer an Account Upgrade.

I've Disabled AdBlock