• Content count

  • Joined

  • Last visited

About BlackDream

Profile Information

  • Gender
    Not Telling


  • Sex

Recent Profile Visitors

6,751 profile views
  1. Dear Valuable Customers, In this tutorial we are going to learn how we can migrate Our MySQL Database to MariaDB 10.1. MariaDB is a database engine, first released in 2009. It’s an open-source fork of the MySQL database management system, designed as a drop-in replacement for MySQL. What differentiates MariaDB from MySQL is its more open-source development, which has allowed it to grow faster and with more new major features in each update than MySQL. While MySQL has wider distribution and simpler installation, MariaDB provides greater flexibility, improved performance and more features than can be found in MySQL. Our software running with MariaDB will give you much better experience, will increase performance and stability while reducing your CPU load and system resources. What you can expect: Faster zapping time Faster browsing in CMS in all pages High availability and stability under high/stress load This tutorial applies only for Ubuntu 14.04, but the procedure is very similar to other OS (in case you are using something else, please raise a ticket). TAKE A BACKUP OF YOUR DATABASE BEFORE PROCESSING TO THE NEXT STEPS. Our team won't be responsible in case you loose your data. Open SSH to your Main Server as root and run the following commands one by one. apt-get install software-properties-common apt-key adv --recv-keys --keyserver hkp:// 0xcbcb082a1bb943db add-apt-repository 'deb [arch=amd64,i386,ppc64el] trusty main' apt-get update And now, we will run the command to update to mariadb-server apt-get install mariadb-server -y If the system asks to enter a New MySQL Root password, we just press TAB and SPACE (We will leave it blank ). ( We leave it blank, by pressing TAB and then the OK, with the SPACE button ) After completing the steps above, we should have MariaDB In our system. But there are few more steps to follow. We will enter as root in the database server, to run few queries. mysql -u root -pROOT Replace the ROOT, with your MySQL Root password. You should get something similar to: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 33497 Server version: 10.1.21-MariaDB-1~trusty binary distribution Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]> We will execute 3 Queries one by one. UPDATE mysql.db SET Host = '' WHERE User = 'user_iptvpro'; UPDATE mysql.user SET Host = '' WHERE User = 'user_iptvpro'; FLUSH PRIVILEGES; And now the last step, is to replace the MySQL Config, with a new stronger one. We open /etc/mysql/my.cnf and we replace ALL the contents with: [client] port = 3306 socket = /var/run/mysqld/mysqld.sock [mysqld_safe] socket = /var/run/mysqld/mysqld.sock nice = 0 [mysqld] user = mysql pid-file = /var/run/mysqld/ socket = /var/run/mysqld/mysqld.sock port = 7999 basedir = /usr datadir = /var/lib/mysql tmpdir = /tmp lc-messages-dir = /usr/share/mysql skip-external-locking skip-name-resolve=1 bind-address = * key_buffer_size = 128M myisam_sort_buffer_size = 4M max_allowed_packet = 64M myisam-recover-options = BACKUP max_length_for_sort_data = 8192 query_cache_limit = 16M query_cache_size = 128M expire_logs_days = 10 max_binlog_size = 100M max_connections = 4096 back_log = 4096 open_files_limit = 20240 innodb_open_files = 20240 max_connect_errors = 3072 table_open_cache = 4096 table_definition_cache = 4096 tmp_table_size = 1G max_heap_table_size = 1G innodb_buffer_pool_size = 5G innodb_buffer_pool_instances = 5 innodb_read_io_threads = 64 innodb_write_io_threads = 64 innodb_flush_log_at_trx_commit = 0 innodb_flush_method = O_DIRECT performance_schema = 0 innodb-file-per-table = 1 innodb_use_mtflush=1 innodb_mtflush_threads=16 innodb_io_capacity=20000 innodb_table_locks = 0 thread_cache_size = 4096 thread_handling = pool-of-threads thread_pool_size = 8 thread_pool_idle_timeout = 20 thread_pool_max_threads = 1024 [mysqldump] quick quote-names max_allowed_packet = 16M [mysql] [isamchk] key_buffer_size = 16M Before saving the file, you can change number 8 in line thread_pool_size = 8 to your total CPU Threads. We save the file, and we restart the mysql service using service mysql restart We are done.
  2. The RTMP protocol is supported on the panel. You can import it with no problem., Then the panel will output as MPEG-TS and HLS.
  3. Hello , Our stalker implementation is not meant to be used as API. Please use the new API located here:
  4. Hello RedManMark, First of all v2.3.x and v2.4.x uses the same FFmpeg Version. Secondly, the custom ffmpeg you describe, is the one we are already using but in more advanced way. The -copyts its is at the beggining before input, as well as the -c:v copy and -c:a copy is written as -acodec copy , -vcodec copy which is exactly the same. It makes me wonder how this command helps with the drop, while the default command without custom ffmpeg command is the same. Secondly, the lose of the sound it has been investigated already. The issue is that some panels, especially from v1 (and mostly cracked), they are using an outdated FFmpeg version that is not patched, which makes the channel loose sound but it is coming back after a while or they loose it completely. If you are exchanging with this type of exchangers OR if someone else is exchanging with these streams (and you are getting from him), it is possible that your streams will go out of sync as well. Some streams also require a higher probesize in order to work properly and for this reason you can set a valid probesize at General Settings. Last, ALWAYS pay attention that the Generate New Timestamps Read Input Source in Native Frames Are both set to NO. Both of these settings can cause drop connection, and both can make the audio to go out of sync. The problem becomes bigger, if at least 1 panel has these settings enabled, can break the stream for many other customers. These settings however have their meaning, so removing them is not an option, although most of the times must be NO. I would be happy as well if you can contact me on skype so i can check that drop connection thing, but i'm still pretty sure there is a reason for this. I just want to say again, that no matter what version we release, even if it doesnt have any change ( as we have done it before , since we updated code only on CMS Side), some people still complaining for the new updates. For example we have been informed that some routing to germany is failing due to problem in some internet providers, and that happenned, right after the update. You will remember me, that after 2-3 days, everything will be OK, again and we won't change anything. Exactly the same happened with the version v2.2.0. When we released it everything said it was the most buggy version, and suddendly after 5 days, everyone was saying it is the most stable one. Things are going like this, and everyone must understnad that the IPTV & Internet Providers are constantly having problems, it's something that we can't prevent, and something that will always influence us no matter what we do. Before 1 month, there was one internet company that was under DDos, attack and hunderds of customer's panel gone down. It was when we released the version v2.4.0 after few hours. And everyone was blaming xtream codes about this. Thanks god, they made an annoucement after that and everything back to normal. I know i told a lot of things, unrelated to your first post, but it's something that is bothering me quite often now. That is true as well but it only happens if you have some millions of rows in the database. We have already started to migrate the Panel to Latest version of MariaDB + we provide a higly optimized config that will probably solve the issue you are having + it will give you even better zapping time speed and stability. You can get it if you want now, just raise a ticket, and ask for mariadb + optimize, our staff will understand what they have to do Thank you Regards
  5. Please fast reload your Main Server, issue is fixed.
  6. That is because the partition assigned, usually to /, is almost full. This is a common issue on OVH Servers, because the default partition when you reinstall an OS, is just 20GB on /. There is a temporary fix, but it will happen again. The solution is to give more hard disk space to / mount point. You can try the steps below 1) Clear client request logs 2) Clear closed connection logs 3) Login to your SSH Main Server 4) mysqldump -u root -pPASS --all-databases > /root/db.sql 5) service mysql stop 6) rm -rf /var/lib/mysql/* 7) Open /etc/mysql/my.cnf and add innodb_file_per_table = 1 below [mysqld] 7) /usr/bin/mysql_install_db 8) service mysql restart 9) mysql -u root < /root/db.sql 10) service mysql restart Replace the PASS, with your mysql root password If you are still unsure on how to perform all these steps please contact with our support staff. They will fix it asap
  7. Hello, First of all, regarding the amount of the customers and the problems, it's something that it's true and no one can doubt it. If there was a problem with the buffering, every customer would have freezes, and not just you and another 10 customers obviously. We have panels running over 20.000 concurrent users with more than 40 Load balancers loaded into it. This is an exception, but there is an owner of a panel in xtream that is paying a lot of money for servers, but it's a good example that proves that the panel is working perfectly under serious load with no bufferings or crashing problems. Buffering is not a panel issue, in any way, and it should not be treated like that. Almost in any update we do, no matter if we change just 1 line of code or 100, customer will say buffers because of the new Update, however, after some days without changing anything again, the system is now stable. That's because internet providers, are not giving you all the time the promised bandwidth, because either they can't at the time you want it, or just because they are facing few problems that recently are very common due to amount of IPTV providers. Secondly, we hear many customers that say, in V1 that is working OK, while in v2 there are problems. Apart from the problem that mcktvlee described, this is another false story. Most users, if not all, they are just taking a test server, they install the version 1 along with 2-3 streams that are lagging in their official server ( v2 ), and they find out that their streams there are not laggining. This test is false, and does not provide any accurate information, because you have to load the version 1, with the same amount of connections exactly that you have on v2, and the same amount of streams. Also all users + requests must be transfered to the version 1 panel. This is a test what would give some accurate results, but still not perfect. The reason for this is that you have to try the exactly same server you have on version 2, on version 1 as well. By just picking another server from same company, does not guarantee the perfomance will be the same. Think about 2 PCs over a lan network, that both PCs have no limit in bandwidth. Will the 2 PCs have exactly the same bandwidth ? No unless the bandwidth is shared. This is exactly what happens with the internet providers, they are not sharing the bandwidth and thats why they promise for a guaranteed bandwidth and not dedicated. So in few, words to do a good testing comparing the version 1 and the version 2, is by Having the same server with the same IP Test exactly at the same time of day Transfer all amount of streams to the version 1 panel Transfer all amount of open connections to the version 1 panel Now regarding the new update v2.4.1, it's also true that any bottleneck has been removed, and many customers + the strongest among of them, confirmed that in new version have less freezing, and the overall stability has been increased. The optimization is not an easy process, and unfortunately for us it differs from server to server. Now, to return to the real question that mcktvlee, described, i'm not sure about that problem if i don't check it personally. You have to know though that the configuration when a stream is considered DOWN and when it is OK is different for version 1 and for version 2. Version 1, considers a stream that is Down if at least for 1 minute, it hasn't received a single byte, while in version 2 the limit has changed to 30 seconds. Although it is possible to get a byte after 30 seconds, that does not mean the stream is working ok. What i'm trying to say is that , in version 1, the stream might appear green all the time, but the stream might not working at all sometimes. (I guess you didn't test the stream in your VLC for contiously 16 hours). I repeat again, i'm not saying that what you described is NOT a problem, since i have to check it, but it might end up being what i described above. Version 1, is no way comparable with the version 2, not only in terms of optimizations and bottlenecks, but also to the security side, as they are known exploits for version 1 at the moment. Since the version is discontinued, no updates will be made. Our tests whown that version can't handle many concurrent users ( more than 10k ) and it can't use the entire bandwidth of the server either. Just remember, to follow my advices regarding the compare of v1&v2. mcktvlee, i would by happy to contact me on skype, so we can see the issue together. Raise a support ticket, and ask for my Skype. I will help as much as i can. Thank you Regards
  8. API has been updated and few bugs regarding bouquet handling are now fixed. Also, here are few other requests you can make to the API View Server List Perform this request, to view all your servers, main & load balancers including their status http://your_dns:port/api.php?action=server&sub=list View Online Streams Perform this request, to view only the online Live Streams http://your_dns:port/api.php?action=stream&sub=online View Offline Streams Perform this request, to view only the Offline Live Streams http://your_dns:port/api.php?action=server&sub=offline Start/Restart A Stream Perform this request, to start or restart a Live Stream. The last argument is an array in which you can specify the stream ids. It works with POST method as well. http://your_dns:port/api.php?action=stream&sub=start&stream_ids[]=1 Stop A Stream Perform this request, to stop a Live Stream. The last argument is an array in which you can specify the stream ids. It works with POST method as well. http://your_dns:port/api.php?action=streamsub=stop&stream_ids[]=1
  9. TUNING: NGInx Config TUNING: Sysctl IMPROVEMENT: Optimization regarding mcrypt & encryption that could cause high load under high traffic IMPROVEMENT: Token on User Redirect, is now shorter. Previous token was causing problems to some players Added: Boost Perfomance for Main Servers [ ONLY IF NO STREAMS/VOD ON IT ] Added: Server List / Stream List + Online/Offline + Ability to Restart/stop in API Added: Enable subtitles by default for stalker portal, setting Fixed: Client Request Logs / Closed Connections Buffered Scrolling Fixed: Wrong Timestamp on channel online in Manage Lines for users online Fixed: Some IMDB Posters failed to download in some servers Fixed: Remote API to create users/mag, Bouquet handling Fixed: A rare bug where user may not receive a stream at 1st try Fixed: Some Connections were not closing, although the user had left the stream Fixed: Sorting on mag (rating,number,name) Fixed: Stalker Portal Info Button crash Fixed: EPG Cron crash in case of many EPG data Fixed: Empty Node in some streams Fixed: Send Signal/Message freezing
  10. Hello, These are the new API Calls, that you have to use. It is highly recommended to use this API as it is much faster than the previous one, and also more accurate and with abilities to be extended much more easier and faster than before. Authentication player_api.php?username=X&password=X GET Live Stream Categories player_api.php?username=X&password=X&action=get_live_categories GET VOD Stream Categories player_api.php?username=X&password=X&action=get_vod_categories GET LIVE Streams player_api.php?username=X&password=X&action=get_live_streams (This will get All LIVE Streams) player_api.php?username=X&password=X&action=get_live_streams&category_id=X (This will get All LIVE Streams in the selected category ONLY) GET VOD Streams player_api.php?username=X&password=X&action=get_vod_streams (This will get All VOD Streams) player_api.php?username=X&password=X&action=get_vod_streams&category_id=X (This will get All VOD Streams in the selected category ONLY) GET VOD Info player_api.php?username=X&password=X&action=get_vod_info&vod_id=X (This will get info such as video codecs, duration, description, directors for 1 VOD) GET short_epg for LIVE Streams (same as stalker portal, prints the next X EPG that will play soon) player_api.php?username=X&password=X&action=get_short_epg&stream_id=X player_api.php?username=X&password=X&action=get_short_epg&stream_id=X&limit=X (You can specify a limit too, without limit the default is 4 epg listings) GET ALL EPG for LIVE Streams (same as stalker portal, but it will print all epg listings regardless of the day) player_api.php?username=X&password=X&action=get_simple_data_table&stream_id=X
  11. We no longer support this addon. Xtream codes has native stalker portal that has almost all the important features that someone might want from stalker and on each update we add more and more.
  12. Dear Valuable Customers, Today we're happy to inform you that our new and improved version of Our successful Software is finally released. In this release, we worked really hard to make new features, and in parallel to fix almost all the bugs that have been reported to us. We are also excited to announce that the Instant Restart of streams, that everyone was dreaming of, is now here. This release, will boost your stream's uptime a lot because, if a stream is down and immediately comes online, your clients wont be disconnected. It should work really well in case a drop connection occurs too. Things to Consider of , in the new version: a) On-Demand mode is totally different now On-Demand received a ground-up rewrite, and now is more stable and faster than ever. So fast, that you won't even find the difference between live and On-Demand. (It depends on the Source ,however with v2 sources will be instant). We also wrote the ondemand in such way, so you can apply it per server, and per stream. Which means you can assign all or some of the servers as ondemand in a specific stream. It's good if you want to have the stream open in 1 Server, and other servers taking from this server can be On-Demand enabled. That means, every previous configuration after the update will be gone. However, you can anytime, go to Mass Edit Streams, and configure the On-Demand as you like. Please remember not to set On-Demand in the streams that you are re-sharing. b) GeoIP Balance Rework & ISP load Balance GeoIP balance received a ground-up rewrite as well to cover all the possible cases , and we are also introducing an ISP load balancing (Needs the reshare addon) .You will see a new option Under Manage Servers -> Edit Server to set the balancing type as Low Priority / High Priority / Strict. You will find more information about this, in your Panel by reading the descriptions. c) A MAG Device is receiving the STB Blocked message. In the new version, we added the ability to lock the STB Device on the hardware. Which means if a client is using the same MAC Address in multiple devices (stb,android stb) he will probably get this message. The STB Locking to hardware is by default enabled but you can anytime switch it off by going to Manage Mag Devices -> Edit Here is the Complete Change Log of the new Version: NEW FEATURE: Instant Restart of Streams NEW FEATURE: ISP-based Load Balancing (Needs the ISP Addon) NEW FEATURE: Recording on MAG Devices NEW FEATURE: You can now Import Videos/Streams from many Video Platforms such as YouTube/LiveStreamer/Twich/Vimeo/DailyMotion and few Porn WebSites NEW API: New Player API. We will make the documentation soon. RE-WRITE: GeoIP Load Balancing IMPROVEMENT: If a stream goes down and immediately start again, the connected client wont be disconnected (should increase uptimes a lot) IMPROVEMENT: Use NGINX Buffer to store the segment before pushing them to client (Can take a lot of resources). General Settings. IMPROVEMENT: Zapping time should be sligtly faster as some optimizations took place IMPROVEMENT: Zapping time on KODI should now be instant (no need to change anything on kodi client) IMPROVEMENT: Clients can now select their Timezone on Stalker Portal which allows to view correct Times for EPG IMPROVEMENT: Stalker Portal optimizations IMPROVEMENT: ON-DEMAND Streams are now faster and stable. IMPROVEMENT: Stream backup switch is now faster and stable IMPROVEMENT: Clients are now being killed faster if they open more than the allowed connections IMPROVEMENT: Redirecting on Load balancer is now faster and safer IMPROVEMENT: You can now restart stopped/offline/online streams in Manage Servers in the Selected Servers IMPROVEMENT: Fast Reload on Servers is now a lot faster, and it doesn't kill Clients/Streams. You can use it safely whenever we make new bug fixes without interruptions. IMPROVEMENT: HLS Output is now way more secure & optimized NEW SETTING: You can now lock STB Devices depending on their Firmware NEW SETTING: You can now choose if you want to assign manually the numbers in channels on STB Devices NEW SETTING: Prebuffer for restreams (yes/no) NEW SETTING: You can now ignore prebuffer data NEW SETTING: Strem restart on audio Loss ( General Settings ) NEW SECTION: Security Center ADDED: You can now temporary disable a Load Balancer from the Manage Servers menu ADDED: PVR KODI Stalker Addon Support Added: Duplicate a bouquet NEW Tool: You can now change the DNS from your sources NEW Tool: You can now easily swap streams between 2 servers NEW Tool: You can now transfer streams from one server to another Fixed: Upon delete/block/disable of a user all connections are being killed properly Fixed: You can now kill an HLS connection from Connection logs Fixed: Bad queries written on panel error logs Fixed: Video When Channel is offline will now be shown even if the channel is stopped and also works with HLS Fixed: An Expired/Disabled line could see channel information with Panel API Fixed: An Expired/Disabled line could see your XMLTV feed Fixed: Passwords are now case sensitive Fixed: VOD/Timeshift Pause & seek on MAG Devices Fixed: MAG Devices videoclub rating is back Fixed: Seeking on MAG Devices works now with Arrow Keys Fixed: Adult VOD content was asking for password all the time on MAG Devices Fixed: RTMP Output steams From TBS Encoders Fixed: FFmpeg will now copy the unknown codecs within streams and will not ignore them Fixed: RAM Memory Usage on CentOS/Ubuntu 16 Fixed: Client connections were killed if load balancer had different datetime from Main Server Fixed: MAG Devices are now properly authenticated Fixed: Authentication Header is now used on MAG Devices and security increased Fixed: Channel Number on MAG Devices is now based on Bouquet Order and list should load faster due to optimizations. Fixed: Timeshift should now be accurate depending on the timezone selected from STB Device Fixed: FFmpeg Custom FFmpeg Command Fixed: Transcoding System Fixed: RTMP Output In Some Streams Fixed: User/Stream Stats are now displaying accurate timestamps Fixed: Closed/Open Connection Logs timestamps are now accurate and based on Main Server date time Fixed: Sending a fingerprint/message will not cause discontinuity Fixed: Net/PTS Speed in Manage Streams is now accurate (was always 1x in v2.3.x) Changed: Drop Connection From a Server function is now a lot more faster and accurate Changed: Drop Connections from A user function is now a lot more faster and accurate Changed: Bouquet manager (Add/Edit) is now using new system that allows easier sorting/searching etc Changed: Added STB Type & STB Information on MAG Devices Section. A lot of bugs fixed and improvements all over the core.
  13. Dear Customers, In this tutorial we are going to learn how we can use the API that was released in v2.3.x. To successfully use the API, you have to import your IP first into the whitelist. You can do that in General Settings -> API Settings. Creating New Line To create a New line, we will call the following URL. http://dns:port/api.php?action=user&sub=create The above URL, accepts the POST action, and to create a new line we will have to specify some arguments in an array called user_data Example Code: <?php $panel_url = 'http://DNS:PORT/'; $username = 'test_username'; $password = 'test_password'; $max_connections = 1; $reseller = 1; $bouquet_ids = array( 1, 2, 3 ); $expire_date = strtotime( "+1 month" ); ############################################################################### $post_data = array( 'user_data' => array( 'username' => $username, 'password' => $password, 'max_connections' => $max_connections, 'is_restreamer' => $reseller, 'exp_date' => $expire_date, 'bouquet' => json_encode( $bouquet_ids ) ) ); $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 ) ); ?> If you leave the username and/or password elements empty, the system will generate random characters for these 2 fields. In addition, leaving any field empty, api will use the default value for this field according to SQL Database. So theoretically, you can make a line with just Calling the Above URL, without any parameter, however the created user, wont have any bouquets inside. You can call any other element that is in the database like member_id admin_enabled enabled allowed_ips allowed_ua force_server_id is_isplock admin_notes and so on... If you want to set the allowed_ips/allowed_ua since this is a JSON Encoded format you can do it like bouquet in the above Code. The API will return a simple json encoded string that upon decoding will contain the element result which returns true/false. Example(API Success) {"result":true,"created_id":14838,"username":"d4PSc5uCqF","password":"2ZiuRRZk4b"} The API returned as the username/password of the NEW line, as well as the ID so we can use it wherever we want. Example(API Failed) {"result":false,"error":"EXISTS"} {"result":false,"error":"PARAMETER ERROR"} EXISTS The Username you specified already exists in the database PARAMETER ERROR You wrote invalid characters in your user_data array Editing Line To procedure to edit a line is very similar to the above. The URL we will call this time is http://dns:port/api.php?action=user&sub=edit REQUIRED PARAMETERS username password OPTIONAL PARAMETERS user_data array For example if we want to Edit the Expire Date, make the line restreamer and adjusting the max connections to 10 we will do it like this: <?php $panel_url = 'http://DNS:PORT/'; $username = 'test_username'; $password = 'test_password'; $max_connections = 10; $reseller = 1; $expire_date = strtotime( "+1 month" ); //from the time now, not from line's expire date. ############################################################################### $post_data = array( 'username' => $username, 'password' => $password, 'user_data' => array( 'max_connections' => $max_connections, 'is_restreamer' => $reseller, 'exp_date' => $expire_date ) ); $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=edit", false, $context ) ); ?> In the above example, we will edit the max_connections, is_restreamer and exp_date for our line with username test_username, and password test_password that already exists in our database. Example(API Success) {"result":true} Example(API Failed) {"result":false,"error":"NOT EXISTS"} {"result":false,"error":"PARAMETER ERROR"} {"result":false,"error":"PARAMETER ERROR (user\/pass)"} NOT EXISTS The Username / Password you specified are not exists in the database PARAMETER ERROR You wrote invalid characters in your user_data array PARAMETER ERROR (user/pass) The Username OR/AND Password elements are missing View Line Information With this API call, we will get all the information available about our line including the active connections. The URL we will call this time is http://dns:port/api.php?action=user&sub=info REQUIRED PARAMETERS username password It will return a JSON Encoded string, with all information that you might want. Example Code: $panel_url = 'http://DNS:PORT/'; $username = "username"; $password = "passwrd"; ############################################################################### $post_data = array( 'username' => $username, 'password' => $password ); $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=info", false, $context ), true ); if ( $api_result['result'] ) { echo "Active Connections (Now): " . $api_result['user_info']['active_cons']; echo "\nCurrent Expire Date: " . (( empty( $api_result['user_info']['exp_date'] ) ) ? 'Unlimited' : strtotime( $api_result['user_info']['exp_date'] )); echo "\nMax Connections: " . $api_result['user_info']['max_connections']; echo "\nAvailable Channel IDs: " . implode( ',', $api_result['user_info']['channel_ids'] ); } else echo 'FAILED'; Create/Edit & View Information on MAG Devices The procedure is almost the same as creating/editing & view info on a user line. The only difference is that instead of calling the user action, we will the stb action. Of course instead of username/password we will just have the mac parameter. Example API Call To Create New MAG http://dns:port/api.php?action=stb&sub=create REQUIRED PARAMETERS user_data[mac] <?php $panel_url = 'http://DNS:PORT/'; $mac = '00:1A:79:79:79:79'; $bouquet_ids = array( 1, 2, 3 ); $expire_date = strtotime( "+1 month" ); ############################################################################### $post_data = array( 'user_data' => array( 'mac' => $mac, 'exp_date' => $expire_date, 'bouquet' => json_encode( $bouquet_ids ) ) ); $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=stb&sub=create", false, $context ) ); print_r($api_result); ?> Example(API Success) {"result":true} Example(API Failed) {"result":false,"error":"NOT EXISTS"} {"result":false,"error":"PARAMETER ERROR"} {"result":false,"error":"PARAMETER ERROR (mac)"} EXISTS The MAC already exists in the database PARAMETER ERROR You wrote invalid characters in your user_data array PARAMETER ERROR (mac) The MAC Parameter was missing Example API Call To Edit a MAG Device http://dns:port/api.php?action=stb&sub=edit REQUIRED PARAMETERS mac <?php $panel_url = 'http://DNS:PORT/'; $mac = '00:1A:79:79:79:79'; $bouquet_ids = array( 1, 2, 3 ); $expire_date = strtotime( "+1 month" ); ############################################################################### $post_data = array( 'mac' => $mac, 'user_data' => array( 'exp_date' => $expire_date, 'bouquet' => json_encode( $bouquet_ids ) ) ); $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=stb&sub=edit", false, $context ) ); ?> Example(API Success) {"result":true} Example(API Failed) {"result":false} {"result":false,"error":"PARAMETER ERROR"} {"result":false,"error":"PARAMETER ERROR (mac)"} no error The updated information, are the same as in the database, so no action taken. PARAMETER ERROR You wrote invalid characters in your user_data array PARAMETER ERROR (mac) The MAC Parameter was missing View Information MAG Device http://dns:port/api.php?action=stb&sub=info REQUIRED PARAMETERS mac It will return a JSON Encoded string, with all information that you might want. Example Code: <?php $panel_url = 'http://DNS:PORT/'; $mac = '00:1A:79:79:79:79'; ############################################################################### $post_data = array( 'mac' => $mac); $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=stb&sub=info", false, $context ), true ); if ( $api_result['result'] ) { echo "Active Connections (Now): " . $api_result['user_info']['active_cons']; echo "\nCurrent Expire Date: " . ( ( empty( $api_result['user_info']['exp_date'] ) ) ? 'Unlimited' : strtotime( $api_result['user_info']['exp_date'] ) ); echo "\nMax Connections: " . $api_result['user_info']['max_connections']; echo "\nAvailable Channel IDs: " . implode( ',', $api_result['user_info']['channel_ids'] ); } else echo 'FAILED'; ?>
  14. Dear Valuable Customers, We noticed that Servers from OVH which contain a modified kernel By OVH, are experience problems with our Software such as High CPU Usage, Crashes & Decreased Performance. We aware that this problem applies to Ubuntu 14.X but may affect others too. PLEASE TAKE A FULL BACKUP OF YOUR SERVER BEFORE UPDATING THE KERNEL. YOUR SERVER MIGHT NOT BOOT AFTER UPDATING. WE ARE NOT RESPONSIBLE FOR ANY DAMAGE THAT THIS MAY CAUSE We suggest you to Update your Kernel Immediately with the following commands. You can run them in SSH (login as root) one by one: apt-get install linux-generic-lts-xenial mv /etc/grub.d/06_OVHkernel /etc/grub.d/25_OVHkernel update-grub reboot After that your server will reboot. Allow up to 5 minutes for the server to boot up again. The 1st reboot needs some time. Thank you Regards
  15. Dear valuable customers, We prepared a Subreseller system for you, and to prevent any downtime, we just applied the new system, in all the current v2.3.1 panels. If you are reading this, and you have the new version v2.3.1, you should have the new system embed. This system gives the ability to groups where the Reseller status is ON, to be able to make their own reseller which we call subreseller. A subreseller has similar features and abilities like the Main Reseller, with the difference that his Users, Credits & Packages are being controlled by his owner. Features Reseller can make their own resellers (subresellers) Resellers can remove some of the packages for their subresellers Resellers can adjust different credit costs for any of the packages that are assigned by the administrator Subresellers users & credits, are being controlled by the resellers who made them Administrator can edit the permissions from the Admin Panel -> Manage Member Groups Administrators can now edit the Packages and apply different credit costs per Reseller (the current system is per group). Now he can do both. ( Manage Registered Users -> Edit -> Assign Packages ) Administrators can force a user to be subreseller of someone else. ( Manage Registered Users -> Edit -> Make this User SubReseller To )