The Ultimate Dual-Portal Streaming Experience
Features β’
Installation β’
Configuration β’
APIs β’
IMPORTANT LEGAL NOTICE: This project is created strictly for educational and research purposes to demonstrate:
- Modern web development with PHP and JavaScript
- API integration with AniList GraphQL and TMDB REST APIs
- Database design for user management and watch history
- Responsive UI/UX design with Tailwind CSS
This project does NOT host any copyrighted content. All video content is streamed through third-party embedding services. The developers do not endorse or encourage piracy. Users are responsible for complying with their local copyright laws.
- π¨ Cyberpunk UI Design - Dark theme with neon accents and animated ambient blobs
- π± Mobile-Optimized - Fully responsive design for all devices
- π Advanced Search - Real-time search with AniList & TMDB APIs
- π Continue Watching - Database-backed watch history with progress tracking
- π User Authentication - Secure signup/login with password hashing
- π― Spotlight Carousel - Auto-rotating featured content showcase
- π Page Analytics - View counting and like/dislike system
PHP 8.x ββββββββββ Backend Logic
MySQL/MariaDB ββββββββββ Database
Tailwind CSS ββββββββββ Styling
JavaScript ββββββββββ Interactivity
AniList API ββββββββββ Anime Metadata
TMDB API ββββββββββ Movie/TV Metadata
- PHP 8.0 or higher
- MySQL 5.7+ or MariaDB 10.3+
- Web server (Apache/Nginx)
- SSL certificate (recommended for production)
git clone https://github.com/Zentrix-Dev/ZentrixStream.git
cd ZentrixStreamCreate a MySQL database and import the required tables:
-- Users table
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) UNIQUE NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
-- Watch history table
CREATE TABLE watch_history (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
anime_id VARCHAR(50) NOT NULL,
anime_title VARCHAR(255) NOT NULL,
episode INT DEFAULT 1,
watched_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
UNIQUE KEY unique_watch (user_id, anime_id),
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
-- Page analytics table
CREATE TABLE pageview (
id INT AUTO_INCREMENT PRIMARY KEY,
pageID VARCHAR(100) UNIQUE NOT NULL,
totalview INT DEFAULT 0,
like_count INT DEFAULT 0,
dislike_count INT DEFAULT 0,
animeID VARCHAR(50)
);// Database credentials
$dbHost = 'localhost';
$dbUser = 'your_username';
$dbPass = 'your_password';
$dbName = 'zentrix_db';
// Site settings
$websiteTitle = "Zentrix Stream";
$websiteUrl = "https://yourdomain.com";// Database (same as above)
// In movie/.env:
TMDB_API_KEY=your_tmdb_api_key_here- AniList API - Free, no key required (GraphQL endpoint)
- TMDB API - Get free key at themoviedb.org/settings/api
ZentrixStream/
βββ index.php # Landing page with dual portal
βββ LICENSE # GPL-3.0 License
βββ ZentrixDev.png # Logo asset
β
βββ anime/ # π ANIME PORTAL
β βββ index.php # Main anime browsing
β βββ _config.php # Portal configuration
β βββ db.php # Database connection
β βββ pages/ # Portal pages
β β βββ watch.php # Video player
β β βββ details.php # Anime details
β β βββ signup.php # Registration
β β βββ login.php # Authentication
β β βββ profile.php # User profile
β β βββ ...
β βββ components/ # Reusable sections
β βββ trending.php
β βββ schedule.php
β βββ ...
β
βββ movie/ # π¬ MOVIE PORTAL
βββ index.php # Main movie browsing
βββ _config.php # Portal configuration
βββ .env # API keys (gitignored)
βββ pages/ # Portal pages
βββ watch.php
βββ trending.php
βββ ...
Add to your php.ini or .htaccess:
; Hide PHP version
expose_php = Off
; Secure sessions
session.cookie_httponly = 1
session.cookie_secure = 1
session.use_strict_mode = 1# Protect sensitive files
<FilesMatch "^\.">
Order allow,deny
Deny from all
</FilesMatch>
<FilesMatch "\.(env|ini|log)$">
Order allow,deny
Deny from all
</FilesMatch>
# Enable compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css application/javascript
</IfModule>Endpoint: https://graphql.anilist.co
Example query for trending anime:
query {
Page(perPage: 15) {
media(sort: TRENDING_DESC, type: ANIME, isAdult: false) {
id
title { english romaji }
coverImage { extraLarge }
bannerImage
description
episodes
}
}
}Base URL: https://api.themoviedb.org/3
Example endpoints:
- Trending:
/trending/all/day?api_key={KEY} - Movie details:
/movie/{id}?api_key={KEY} - TV details:
/tv/{id}?api_key={KEY}
This codebase implements several security measures:
- β Prepared Statements - All database queries use PDO/MySQLi prepared statements
- β
Password Hashing - bcrypt via
password_hash() - β
XSS Protection - Output escaping with
htmlspecialchars() - β CSRF Tokens - Form protection implemented
- β Input Validation - Server-side validation on all inputs
Always keep your dependencies updated and follow security best practices.
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the GNU General Public License v3.0 - see LICENSE for details.
Copyright (C) 2026 Zentrix-Dev
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
- AniList for comprehensive anime metadata
- The Movie Database (TMDB) for movie/TV data
- Tailwind CSS for the utility-first CSS framework
- Inter Font for the beautiful typeface
β Star this repository if you find it helpful!
Made with π by Zentrix-Dev
