PLAYGO is a production-ready, modular web-based IPTV player that connects to Xtream UI-compatible IPTV services. Built with a clean MVC architecture, it provides a comprehensive streaming platform with advanced features including user profiles, custom playlists, saga management, and real-time progress tracking. The system uses JSON-based storage for scalability and performance, eliminating the need for traditional databases.
⚠️ IMPORTANT NOTICE: This PHP version is an outdated legacy version of the PLAYGO project. The current active version has been migrated to React.js and Node.js with PostgreSQL database, featuring a completely redesigned architecture and enhanced functionality. This PHP repository is maintained for historical reference and legacy deployments only.
PLAYGO follows a Model-View-Controller (MVC) architecture pattern with clear separation of concerns:
- Controllers (
libs/controllers/): Handle HTTP requests, orchestrate business logic, and prepare data for views - Services (
libs/services/): Contain core business logic, API integrations, and data processing - Endpoints (
libs/endpoints/): RESTful API endpoints for AJAX requests and data operations - Views: PHP templates that render the user interface
- Storage: JSON-based file system for user data, playlists, history, and configuration
- Live TV Streaming: Real-time channel streaming with EPG support
- VOD Library: Complete movie and series catalog with metadata
- Series Management: Multi-season series with episode tracking
- Content Search: Full-text search across all content types
- Content Recommendations: AI-powered recommendations based on viewing history
- User Profiles: Comprehensive user profiles with statistics and account information
- Authentication System: Secure login with Xtream UI credential validation
- Session Management: Cookie-based session handling with expiration tracking
- User Data Storage: Per-user JSON storage for isolation and scalability
- Progress Tracking: Real-time viewing progress with resume functionality
- Watch History: Complete viewing history with date tracking and filtering
- Custom Playlists: User-created playlists with drag-and-drop reordering
- Saga Management: Create and manage custom movie/series sagas
- Favorites System: Quick access to favorite content
- Content Collections: Pre-defined collections and curated content
- Parallel API Processing:
curl_multifor concurrent Xtream UI API calls - Response Caching: Intelligent caching of API responses and metadata
- Image Optimization: Lazy loading, WebP support, and fallback mechanisms
- Responsive Design: Mobile-first design with Android optimization
- Performance Monitoring: Built-in performance tracking and optimization
PLAYGO/
├── index.php # Application entry point
├── login.php # Authentication interface
├── home.php # Dashboard/homepage
├── profile.php # User profile management
├── playlist.php # Playlist viewer
├── collection.php # Saga/collection viewer
├── sagas.php # Saga listing
├── sagas_admin.php # Saga administration panel
│
├── channels.php / channel.php # Live TV channels
├── movies.php / movie.php # Movie catalog
├── series.php / serie.php # Series catalog
├── episode.php # Episode player
│
├── libs/ # Core application logic
│ ├── controllers/ # MVC Controllers
│ │ ├── Authentication.php # Login/logout handling
│ │ ├── Profile.php # User profile data
│ │ ├── Collection.php # Saga/collection rendering
│ │ ├── Movie.php # Movie detail controller
│ │ ├── SeriePageController.php # Series detail controller
│ │ ├── EpisodePageController.php # Episode controller
│ │ ├── Search.php # Search functionality
│ │ └── SagasAdminController.php # Saga admin operations
│ │
│ ├── services/ # Business logic layer
│ │ ├── auth.php # Authentication service
│ │ ├── XtreamApi.php # Xtream UI API client
│ │ ├── collection.php # Collection processing
│ │ ├── movies.php # Movie data processing
│ │ ├── series.php # Series data processing
│ │ ├── series-episodes.php # Episode management
│ │ ├── live.php # Live TV processing
│ │ └── content.php # Content aggregation
│ │
│ ├── endpoints/ # REST API endpoints
│ │ ├── UserData.php # User data operations
│ │ ├── SagasAdmin.php # Saga CRUD operations
│ │ ├── XtreamApi.php # Xtream API proxy
│ │ ├── ApiContent.php # Content API
│ │ └── MovieRecommended.php # Recommendations API
│ │
│ ├── config.php # Application configuration
│ ├── config.example.php # Configuration template
│ ├── lib.php # Utility functions
│ └── connection.php # Database abstraction (future)
│
├── storage/ # JSON-based data storage
│ ├── sagas.json # Saga definitions
│ ├── users/ # Per-user data
│ │ └── [username]/
│ │ ├── user_data.json # User session history
│ │ ├── playlists.json # User playlists
│ │ ├── favorites.json # Favorite content
│ │ ├── history.json # Viewing history
│ │ └── progress.json # Viewing progress
│
├── assets/ # Static assets
│ ├── icon/ # Icon files (SVG, PNG)
│ ├── image/ # Images (wallpapers, screenshots)
│ └── logo/ # Branding assets
│
├── styles/ # CSS stylesheets (organized by page)
│ ├── profile/ # Profile page styles
│ │ ├── layout.css # Desktop layout
│ │ └── mobile.css # Mobile/Android optimization
│ ├── collection/ # Collection page styles
│ ├── movie/ # Movie page styles
│ ├── serie/ # Series page styles
│ ├── playlist/ # Playlist page styles
│ └── [page]/ # Page-specific styles
│
├── scripts/ # JavaScript modules
│ ├── profile/ # Profile page scripts
│ │ └── init.js # Carousel initialization
│ ├── collection/ # Collection page scripts
│ ├── movie/ # Movie page scripts
│ ├── serie/ # Series page scripts
│ └── [page]/ # Page-specific scripts
│
├── vendor/ # Third-party dependencies
│ └── phpmailer/ # PHPMailer library
│
└── tmdb_cache/ # TMDB metadata cache
- Web Server: Apache 2.4+ or Nginx 1.18+
- PHP: 7.4 or higher (PHP 8.0+ recommended)
- PHP Extensions:
curl- For API communicationjson- For JSON data processingmbstring- For string manipulationopenssl- For secure connectionsfileinfo- For file type detectiongdorimagick- For image processing (optional)
- Storage: Minimum 100MB free space (for cache and user data)
- Memory: PHP memory_limit ≥ 128MB recommended
- Permissions: Write access required for:
storage/directory and subdirectoriestmdb_cache/directory
- Xtream UI: Compatible IPTV service with API access
- TMDB API (Optional): For enhanced metadata and artwork
- SMTP Server (Optional): For email notifications
-
Clone the repository:
git clone https://github.com/Jeremias0618/PLAYGO-Web-IPTV-Player.git cd PLAYGO-Web-IPTV-Player -
Configure the application:
cp libs/config.example.php libs/config.php nano libs/config.php
-
Set required configuration:
define('IP', 'URL_SERVER'); // IP or URL of the Xtream Codes server define('TMDB_API_KEY', 'API_KEY_TMDB'); // TMDB API key define('LANGUAGE', 'LANGUAGE_DEFAULT'); // Default language for movie and series descriptions define('NOME_IPTV', 'PLAYGO'); // IPTV service name
-
Set directory permissions:
chmod -R 755 storage/ chmod -R 755 tmdb_cache/
-
Configure web server (Apache example):
- Enable
mod_rewrite - Set
DocumentRootto project directory - Configure virtual host (see
.htaccess.example)
- Enable
| Option | Description | Required |
|---|---|---|
IP |
IP or URL of the Xtream Codes server | Yes |
TMDB_API_KEY |
TMDB API key for metadata | Yes |
LANGUAGE |
Default language (es-ES, es-MX, en-US, etc.) | Yes |
NOME_IPTV |
IPTV service name | Yes |
SMTP_* |
SMTP configuration for emails | No |
PLAYGO integrates with Xtream UI API for content delivery:
// Example: Fetching movie information
$api = new XtreamApiService();
$movieInfo = $api->getVodInfo($movieId);Supported Endpoints:
get_live_categories- Live TV categoriesget_live_streams- Live TV streamsget_vod_categories- VOD categoriesget_vod_info- Movie informationget_series_categories- Series categoriesget_series_info- Series informationget_series_episodes- Episode listingget_account_info- User account details
PLAYGO provides RESTful endpoints for frontend operations:
-
POST /libs/endpoints/UserData.php- User data operationsaction=playlist_create- Create playlistaction=playlist_delete- Delete playlistaction=playlist_add- Add item to playlistaction=playlist_remove- Remove item from playlistaction=favorite_add- Add to favoritesaction=favorite_remove- Remove from favoritesaction=history_add- Add to historyaction=progress_update- Update viewing progress
-
POST /libs/endpoints/SagasAdmin.php- Saga managementaction=create- Create new sagaaction=update- Update existing sagaaction=delete- Delete sagaaction=list- List all sagas
- PHP: PSR-12 coding standard
- JavaScript: ES6+ with jQuery compatibility
- CSS: BEM-like naming convention
- File Naming: kebab-case for files, PascalCase for classes
# Test API connectivity
php -r "require 'libs/services/XtreamApi.php'; ..."
# Validate JSON structure
php -r "json_decode(file_get_contents('storage/sagas.json'));"Enable error reporting in development:
// In libs/config.php
error_reporting(E_ALL);
ini_set('display_errors', 1);// Via admin panel: sagas_admin.php
// Or programmatically:
$sagaData = [
'id' => 1,
'title' => 'Marvel Cinematic Universe',
'image' => 'path/to/image.jpg',
'items' => [
['id' => '123', 'type' => 'movie', 'name' => 'Iron Man', 'order' => 1],
// ...
]
];fetch('libs/endpoints/UserData.php', {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: 'action=playlist_add&playlist_name=My%20List&item_id=123&item_type=movie'
});- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow existing code style and architecture patterns
- Add comments for complex logic
- Update documentation for new features
- Test on multiple devices and browsers
- Ensure backward compatibility
This project is licensed under the Creative Commons Attribution-NonCommercial (CC BY-NC 4.0) license.
See the LICENSE file for details.
Commercial Use: For commercial licensing, please contact the project maintainers.
PLAYGO does not host, store, or provide any IPTV content. It is a tool for connecting to legally obtained IPTV services. Users are solely responsible for ensuring they have proper licensing and authorization to access the content they stream through this application.
The developers and contributors of PLAYGO are not responsible for:
- Content accessed through the application
- Legal issues arising from content access
- Service availability or quality from IPTV providers
- Any misuse of the application
- Issues: GitHub Issues
- Pull Requests: GitHub Pull Requests
- Documentation: See inline code comments and this README
This PHP version is deprecated and no longer actively maintained.
The PLAYGO project has been fully migrated to a modern technology stack:
- Frontend: React.js with modern UI/UX design
- Backend: Node.js with Express.js framework
- Database: PostgreSQL for robust data management
- Architecture: RESTful API with microservices architecture
The current active version features:
- Complete redesign with improved user experience
- Enhanced performance and scalability
- Advanced features and functionality
- Better security and maintainability
- Modern development workflow
This PHP repository is maintained for:
- Historical reference
- Legacy deployments still in use
- Educational purposes
For the latest version and active development, please refer to the React.js/Node.js repository.
Developed with ❤️ by CYBERCODE LABS
This project represents a comprehensive effort in web-based IPTV streaming solutions, combining modern web technologies with robust backend architectures to deliver seamless streaming experiences.
- Architecture & Design: Clean MVC pattern implementation with modular service layer
- Backend Development: PHP 7.4+ with JSON-based storage architecture
- Frontend Development: Responsive design with Bootstrap 5.0 and vanilla JavaScript
- API Integration: Xtream UI API integration and RESTful endpoint development
For technical inquiries, contributions, or collaboration opportunities, please refer to our GitHub Issues.
© 2026 CYBERCODE LABS. All rights reserved.


