php example to get custom playlist from xtream-codes api with pretty url and easy configuration

There are 12 replies in this Thread which was already clicked 22,139 times. The last Post () by liamkenyon.

  • Hello everyone,


    Use the code below as simple reference to build your own custom playlist from your xtream-codes server.


    Change the $url and $port values with your main server domain and port values.


    Use the code below in .htaccess file to setup pretty url:

    Apache Configuration
    # AddType application/x-httpd-php53 .php
    php_flag magic_quotes_gpc Off
    
    Options +FollowSymLinks
    RewriteEngine On
    RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /GetChannelsList.php?username=$1&password=$2&type=$3&name=$4 [L


    Depending of how you name your php file, adjust in the above code the filename, change GetChannelsList to the filename you place in the php code.

    If your apache server is configured to use mode rewrite, then you should not be worried.

    Otherwise, see http://www.generateit.net/mod-rewrite/index.php for further instructions.



    The request will look like: http://domain.com/user/pass/hls/name.m3u8


    the response will be an m3u8 file with a content similar to:


    For more custom PHP coding, contact me in private.


    PS: this is a basic version of custom playlist generator. Is fully functional, however improvements can be done. Let me know what you'd like to have in the future versions.

    Thanks and kind regards,

    A LinuxSat-Support Friend!

  • Hello, I own a small server for friends and acquaintances, I read my card with oscam and send it to hosting that has CSP (card server proxy) with sql panel, and smart tvs have an application called SSIPTV that after installed a list of M3u channels, you can access the channels in the list.

  • Okay, I've seen a turorial on the web that teaches to install xtrean code, for iptv panel, I would like to know how I can play the channels of the card being read by oscam server to the iptv panel?

    I looked at the webe and saw nothing that spoke about it.

  • Hello my friend, thank you for sending the list, but that's not what I was looking for, I'm from Brazil, and I own a small oscam server where I share with friends via newcamd, but I would like to share with them through iptv, so I'm looking for A tutorial that could help me on this subject.

  • Hi Xandehenrique,


    Unfortunately, this is not the place you need to get started with this matter.

    In order to move your channels to ITPV, i know a couple of guys which can assist/do this for you but it costs.

    Contact me in private if need additional info.

    Thanks and kind regards,

    A LinuxSat-Support Friend!

  • Can you make a php script to make a m3u and convert it to xstream and then another script from xstream request to normal m3u.

    Reason the app whmcssmarter only works with xc. Looking for a php middleware to make it work with other servers.

  • jackuzzy

    I've tried your script and it works great.

    Can you modify it so that the user first checks the channels (via checkboxes) he wants in the playlist and then downloads the playlist with only the selected channels?

  • amigo me puedes ayudar con esto. No si hay que hacer un archivo nuevo .php o tengo que editar alguno especifico. Si es asi como lo hago y donde lo guardo. Y si no cual es el que tengo que modificar. Por favor me ayudan que no encuentro ninguna informacion de esto.

  • Has anyone got a working example of this? I keep getting errors? And can't figure out why


    jackuzzy

    I've tried your script and it works great.

    Can you modify it so that the user first checks the channels (via checkboxes) he wants in the playlist and then downloads the playlist with only the selected channels?


    jackuzzy

    I've tried your script and it works great.

    Can you modify it so that the user first checks the channels (via checkboxes) he wants in the playlist and then downloads the playlist with only the selected channels?

    Looking for the same feature.

Your hub for IPTV & streaming support.

Get help with Android apps, Smart TV setup, m3u playlists, channel lists, and finding reliable live streaming websites. Master IPTV streaming on all devices. Find downloads, setup tutorials, and community support for apps, Smart TVs, and m3u channel lists.