Skip to content

RubioApps/RubioTV

RubioTV

Web application written for PHP8.x that browses the collections of IPTV sources available at iptv-org With this app, you could to point to the exact channel you want to watch and add it to your favorites.

This works by a combination of the iptv-org catalogue and the DTV sources streamed by a TVHeadend service (add-on of any android box that runs Kodi, LibreElec or CoreElec)

In addition to the catalogue served by iptv-org , it allows to upload your own sources .m3u / .m3u8. In any case, you can request the EPG guide ad-hoc for a given channel. To do so, you would need to install the NodeJS app from EPG Otherwise, you have to disable this option in the configuration file.

This web apps uses a default template based on Bootstrap 5 and JQuery, which is fully responsive for mobile devices. It is recommended to run this web app under Apache2 for domestic purposes

Table of contents

Build your folders

The most efficient and secured structure to run this web app is

yoursite.com 
└───iptv-org-epg
└───tmp
└───log
└───public
    │   configuration.php
    │   cron.php
    │   index.php
    │   README.md
    |   ...
    └───cache
    └───guides
    └───includes
    └───iptv
    └───local
    └───models
    └───sef
    └───static
    └───templates

/iptv-org-epg

It the NodeJS application installed from EPG. If this is not installed, the guide service will not worlk for IPTV sources, and this option has to be disabled in the configuration file.

/tmp

This is used for temporary uploads.

/log

This is used to collect the logs generated by PHP.

/public

This folder contains the web application RubioTV. Download RubioTV and unzip it into the public folder.

Apache2 setup

You can create a directory in your main Apache web application that points to /yoursite.com/public folder. The other subfolders are used only for functional purposes, but they are not accessibles by the clients. Therefore, their access is forbidden.

Please notice that the CORS protection might be setup and the DTV might not work. In order to find a workaround, you have to setup a reverse proxy.

The whole Apache2 setup (mysite.conf) would be like this

    Alias "/tv" "/path/to/your/site/public"
    <Directory "/path/to/your/site/public">  
      DirectoryIndex index.php index.html
      Options FollowSymLinks
      AllowOverride All
      Require all granted            
      <IfModule "mod_headers.c">        
        Header always set Access-Control-Allow-Origin "*"
        Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"
        Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token"
        Header always set Access-Control-Expose-Headers "Content-Security-Policy, Location"
        Header always set Access-Control-Max-Age "600"        
      </IfModule>        
      <FilesMatch "\.php$">
        SetHandler "proxy:unix:/run/php/php8.1-fpm.sock|fcgi://localhost/"
      </FilesMatch>        
    </Directory>
    <Directory "/path/to/your/site/epg"> 
      Order deny,allow
      Deny from all
    </Directory>
    <Directory "/path/to/your/site/log"> 
      Order deny,allow
      Deny from all
    </Directory>
    <Directory "/path/to/your/site/tmp"> 
      Order deny,allow
      Deny from all
    </Directory>
    <IfModule "mod_proxy.c">   
      ProxyPass /coreelec/ http://coreelec.home:9981/
      ProxyPassReverse /coreelec/ http://coreelec.home:9981/      
    </IfModule>  

Configuration

RubioTV can be fully configured by overriding the file configuration.php. Please notice that, in addition to the basic features, you can enable two additional services:

DTV: you would need an accessible service in your LAN. The default configuration points to a, android box that runs a TVHeadend instance EPG: you would need to installed from iptv-org. Please follow the instruction on that page.

You can disable both services if you want a basic IPTV browser.

If you have decided to install the NodeJS application EPG from IPTV-org, you have to setup your PHP to be able to execute shell commands. To do so, you have add the Apache user (usually www-data) to the sudoers

sudo nano /etc/sudoers

Add the line (replace the /var/www/mysite.com/ by the exising path at your server)

www-data ALL=NOPASSWD: /var/www/mysite.com/public/guides/.unlock

As soon as the sudoers file is save, Apache2 / PHP will be able to execute the unique file named .unlock. This file is used as an anti-flood mechanism to avoid to over-charge the server with the NodeJS requests to obtain the guides.

Cron

When the EPG service is active, you might decide to setup a cron job to execute a period request of the guides. If you decided to do so, you hav to edit the crontab for the Apache user (usually www-dataà

sudo crontab -e -u www-data

Add the line

0/15 * * * * /usr/bin/php /path/to/your/site/public/cron.php #RubioTV EPG Process

We recommend to execute the cronjob every 15 minutes for local purposes. You can make it mre frequently depending on the available ressources in your server.

Legal

No video files are stored in this repository. The repository simply contains user-submitted links to publicly available video stream URLs, which to the best of our knowledge have been intentionally made publicly by the copyright holders. If any links in these playlists infringe on your rights as a copyright holder, they may be removed by sending a pull request or opening an issue. However, note that we have no control over the destination of the link, and just removing the link from the playlist will not remove its contents from the web. Note that linking does not directly infringe copyright because no copy is made on the site providing the link, and thus this is not a valid reason to send a DMCA notice to GitHub. To remove this content from the web, you should contact the web host that's actually hosting the content (not GitHub, nor the maintainers of this repository).

License

GNU GENERAL PUBLIC LICENSE

Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. https://fsf.org/

Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.