Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Ί XUI WebTV Client

A modern, lightweight and database-free PHP WebTV client for XUI.ONE and Xtream-compatible IPTV panels.

XUI WebTV Client lets users sign in with their own IPTV subscription credentials and watch Live TV, Movies and Series directly from a clean, TV-friendly web interface.

πŸš€ No database. No admin API. No stream proxy. Just upload, configure your panel URL and start using it.


✨ Highlights

  • ⚑ Plain PHP β€” no framework, no composer setup, no database
  • πŸ” User login with standard IPTV username and password
  • πŸ“‘ Live TV categories, channels, logos and HLS playback
  • 🎬 Movies with posters, ratings, years and IMDb-style metadata
  • πŸ“š Series with categories, posters, seasons, season artwork and episodes
  • 🧾 Account details in the top bar: expiry date, remaining time, max connections, active connections and status
  • πŸ–₯️ TV-friendly UI with large buttons, large typography and keyboard-friendly controls
  • ⭐ Favorites stored locally in the browser
  • ⏯️ Continue watching progress for movies and episodes
  • πŸ”Ž Search for channels, movies and series
  • 🧠 Smart browser playback warnings for unsupported video/audio formats
  • πŸ–ΌοΈ Default fallback images for missing channel logos, posters and covers
  • 🧹 File cache with a one-click Refresh List button
  • πŸ”— Clean URLs without .php extensions
  • πŸ“ Auto path detection for root, subdomain or subdirectory usage
  • 🌐 HTTP mode support for IPTV streams that do not work over SSL

πŸ–ΌοΈ Screenshots

🏠 Dashboard

XUI WebTV Client Dashboard

πŸ“‘ Live TV

XUI WebTV Client Live TV

🎬 Movies

XUI WebTV Client Movies

πŸ“š Series Details

XUI WebTV Client Series Details


🧩 What This Project Is

This project is a standard WebTV viewer application.

Users log in with their own IPTV line credentials:

Username
Password

The application uses the standard Xtream/XUI player API, for example:

/player_api.php?username=USER&password=PASS

It is not an XUI.ONE admin panel project and does not use admin API keys.


βœ… Supported Sections

πŸ“‘ Live TV

  • Live categories
  • Channel lists
  • Channel logos
  • HLS playback with HLS.js
  • Native Safari HLS fallback
  • Fullscreen button
  • Large TV-friendly channel rows

🎬 Movies

  • Movie categories
  • Poster grid
  • Movie details
  • IMDb-style metadata
  • Rating, year, duration, genre, cast and director display when available
  • Browser playback compatibility checks
  • Continue watching support

πŸ“š Series

  • Series categories
  • Poster grid
  • Series details
  • Seasons and season artwork
  • Episode lists
  • Episode playback
  • Continue watching support

βš™οΈ Requirements

  • PHP 7.4+
  • Apache with mod_rewrite enabled, or an equivalent Nginx rule
  • PHP cURL extension recommended
  • An XUI.ONE / Xtream-compatible player API
  • A valid IPTV user account for login testing

No MySQL database is required.


πŸš€ Quick Installation

  1. Upload all project files to your hosting account.
  2. Edit config.php.
  3. Set your XUI.ONE / Xtream panel URL.
  4. Open the WebTV URL in your browser.
  5. Log in with a valid IPTV username and password.

Example config.php values:

'xui_base_url' => 'http://panel.example.com:8080',
'stream_base_url' => '',
'prefer_server_info_stream_url' => true,
'force_http' => true,
'force_http_client_fallback' => true,
'force_stream_http' => true,
'live_stream_extension' => 'm3u8',
'live_fallback_extension' => 'ts',
'player_start_timeout_ms' => 30000,

Do not add /player_api.php to xui_base_url.

Correct:

'xui_base_url' => 'http://panel.example.com:8080',

Wrong:

'xui_base_url' => 'http://panel.example.com:8080/player_api.php',

🌐 Important HTTP / HTTPS Notice

Many IPTV panels and stream servers still serve live channels, movies or episodes over plain HTTP.

When a WebTV page is opened with HTTPS and the media file is HTTP, modern browsers may block playback because of mixed-content rules. In that case, the interface may load correctly but the video will not start.

For HTTP-only IPTV streams, the recommended setup is:

http://webtv.example.com

Not:

https://webtv.example.com

This project includes automatic HTTPS-to-HTTP redirection, but hosting panels, Cloudflare, HSTS or browser cache can still force HTTPS before the application can handle the request.


πŸ† Recommended Production Setup

Use a dedicated subdomain:

webtv.example.com

Point the subdomain document root directly to the project folder.

Recommended final URLs:

http://webtv.example.com
http://webtv.example.com/live
http://webtv.example.com/movies
http://webtv.example.com/series

This is cleaner and safer than installing the project under a path like:

http://example.com/webtv

Subdomain installation also makes it easier to keep HTTP enabled only for WebTV while keeping your main website fully HTTPS.


☁️ Cloudflare Usage

For HTTP-only IPTV streams, the safest Cloudflare setup is:

DNS record: DNS only
Proxy status: Off / grey cloud

Recommended Cloudflare settings for the WebTV subdomain:

  • ❌ Do not force HTTPS
  • ❌ Do not enable Always Use HTTPS
  • ❌ Do not enable HSTS for the WebTV subdomain
  • ❌ Do not use automatic HTTPS rewrite rules for WebTV media paths
  • βœ… Keep the WebTV subdomain reachable over HTTP

If the subdomain is proxied through Cloudflare and Cloudflare forces HTTPS, the WebTV page may open but streams may fail.

Expected behavior:

https://webtv.example.com  ->  http://webtv.example.com
http://webtv.example.com   ->  stays on HTTP

If HTTP immediately turns back into HTTPS, the redirect is happening outside the application. Check Cloudflare rules, HSTS, hosting redirects or browser cache.


🟦 Plesk Installation

  1. Create a subdomain, for example:
webtv.example.com
  1. Set the document root to the project folder.

  2. Upload all files.

  3. Edit config.php and set your panel URL.

  4. Make sure these folders are writable by PHP:

storage/cache
storage/logs
  1. Open the subdomain over HTTP:
http://webtv.example.com

πŸ” Plesk Redirect Loop Fix

If the browser shows:

ERR_TOO_MANY_REDIRECTS

Plesk is probably forcing HTTP back to HTTPS.

In Plesk, open the WebTV subdomain and disable:

Permanent SEO-safe 301 redirect from HTTP to HTTPS

You may keep SSL/TLS support enabled if you still want a certificate available, but HTTPS forcing must be disabled for the WebTV subdomain.

Also check SSL It! settings and disable HSTS for this subdomain.


🟧 cPanel Installation

  1. Create a subdomain:
webtv.example.com
  1. Upload the project files into the subdomain document root.

  2. Edit config.php.

  3. Make sure Apache rewrite rules are enabled.

  4. Make sure these folders are writable:

storage/cache
storage/logs
  1. In cPanel, check Domains and disable Force HTTPS Redirect for the WebTV subdomain if your IPTV streams require HTTP.

Open:

http://webtv.example.com

🧠 Browser Playback Compatibility

Web browsers do not support every IPTV media container or codec.

Best browser compatibility:

  • βœ… HLS / .m3u8
  • βœ… MP4 with browser-compatible video/audio codecs
  • βœ… WebM on supported browsers

May fail or play without audio depending on codec:

  • ⚠️ MKV
  • ⚠️ AVI
  • ⚠️ TS VOD files
  • ⚠️ MP4 files with unsupported audio codecs
  • ⚠️ Some HEVC/H.265 streams

When a movie or episode format is not compatible with the browser, the application shows a clear warning instead of pretending the content is playable.

Recommended message shown to users:

This content format is not supported by your web browser. Please use an IPTV application to watch this content.

πŸ”§ Playback URL Logic

Live TV URLs are generated in this format:

/live/USERNAME/PASSWORD/STREAM_ID.m3u8

Movie URLs:

/movie/USERNAME/PASSWORD/STREAM_ID.EXT

Series episode URLs:

/series/USERNAME/PASSWORD/EPISODE_ID.EXT

If stream_base_url is empty, the system can use the server_info values returned by the player API.

If your panel API URL and stream server URL are different, set stream_base_url manually:

'xui_base_url' => 'http://panel.example.com:8080',
'stream_base_url' => 'http://stream.example.com:8080',

For stubborn HTTPS cache or HSTS problems, using the stream server IP and port may help:

'stream_base_url' => 'http://123.123.123.123:8080',

πŸ› οΈ Troubleshooting

❌ 500 Internal Server Error

Check:

  • PHP version is 7.4 or newer
  • mod_rewrite is enabled
  • .htaccess is allowed by hosting
  • storage/cache is writable
  • storage/logs is writable
  • Hosting error logs for exact PHP/Apache errors

πŸ” Too Many Redirects

Usually caused by two opposite redirects:

WebTV app: HTTPS -> HTTP
Hosting/CDN: HTTP -> HTTPS

Disable forced HTTPS for the WebTV subdomain in Plesk, cPanel, Nginx, Cloudflare or any CDN rule.

⚠️ 307 Internal Redirect from disk cache

This usually means the browser upgraded HTTP to HTTPS before the request was sent, often because of cached HTTPS/HSTS behavior.

Try:

  • Clean browser profile
  • Incognito/private window
  • Different browser
  • Clearing HSTS/cache for the subdomain
  • Using a new WebTV subdomain
  • Setting stream_base_url to HTTP IP:PORT

▢️ Page Opens But Video Does Not Play

Check:

  • Stream URL is HTTP if your streams do not support SSL
  • WebTV page is also HTTP
  • Cloudflare is not forcing HTTPS
  • Browser supports the media format
  • IPTV user account is active
  • Max connections are not exceeded
  • Stream works in an IPTV player with the same credentials

πŸ“‚ Project Structure

xui-webtv-client/
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”œβ”€β”€ img/
β”‚   β”œβ”€β”€ js/
β”‚   └── vendor/
β”œβ”€β”€ docs/
β”‚   └── screenshots/
β”œβ”€β”€ storage/
β”‚   β”œβ”€β”€ cache/
β”‚   └── logs/
β”œβ”€β”€ .htaccess
β”œβ”€β”€ config.php
β”œβ”€β”€ index.php
β”œβ”€β”€ LICENSE
└── README.md

πŸ”’ Security Notes

  • IPTV credentials are used only for the logged-in user's playback session.
  • The project does not require admin API credentials.
  • The project does not create, edit, delete or manage IPTV users.
  • Streams are not proxied through your web server.
  • If users can see their own stream URL in the browser network tab, they are only seeing their own IPTV credentials and playback URL.
  • Keep config.php protected from direct access.
  • Keep storage protected from public access.

βš–οΈ Legal Notice

This project is only a WebTV client interface for compatible IPTV APIs. It does not include, host, sell, provide or redistribute any media content.

You are responsible for using it only with services and content that you are legally allowed to access.


🧭 Suggested GitHub Topics

xui
xui-one
xtream-codes
iptv
webtv
php
hls
m3u8
vod
live-tv
series
movies
iptv-player
web-player

πŸ“œ License

MIT License.


⭐ Support The Project

If this project helps you, consider giving the repository a star on GitHub.

About

A modern, lightweight PHP WebTV client for XUI.ONE and Xtream-compatible IPTV panels. Live TV, Movies and Series support.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages