
Create a Netflix-style streaming site with movies and TV shows, video playback with controls, previews, season and episode navigation, up-next and watch progress, search, and PayPal subscriptions.
Set up a local php server with Xampp on macOS or Linux, start Apache and MySQL services, enable port 8080, and organize your project files in the docs folder.
Install and configure Xampp on Windows to set up a local AMP server, start Apache and MySQL, handle firewall prompts, and locate the htdocs directory for your project.
Install and set up your preferred text editor, such as Visual Studio Code or Sublime Text, with steps to download, install, and follow installation prompts on macOS, Windows, or Linux.
Open your text editor, create a Reese Flicks folder in the docs folder, and save an index.php file. Test locally by visiting localhost/reese flicks to run PHP.
Create a users table in a MySQL database using phpMyAdmin, defining id, first name, last name, username, email, password, signup timestamp, and is_subscribed to support login and user progress tracking.
Create a register page for a Netflix clone by building the HTML scaffold and linking a CSS file from assets/style/style.css to apply red text and basic styling.
Style the register page by creating signing container and column elements, applying a gray background, white panel, and centered layout with flexbox and a subtle rgba box shadow.
Learn to add text input fields to a register form—first name, last name, username, email, and password—with placeholders, name attributes, a post method, and required fields.
Learn how to handle form submissions in PHP by checking $_POST data with the post method, echoing a confirmation when the submit button is pressed, and preparing to process inputs.
Add padding to input columns, build a header with a title and subtitle, and style with css selectors like .column and .header. Set a global font and a #333 color.
Add a site logo to the register page using assets/images/logo.png, then set the image tag’s src, add title and alt text, and width 100 for a responsive display.
Style a login link on the registration page to login.php with a sign in message. Use font size 14px, font weight 400, remove underline, and enable box-sizing border-box overflow-y auto.
Copy the code from register.php into login.php, keep only username and password fields, rename the header to sign in, and update the link to register.
Learn to sanitize the user's first name in a PHP signup form by stripping html tags, trimming spaces, and capitalizing the first letter before database handling.
Create a PHP form sanitizer class named FormSanitizer with a static sanitize_form_string method, stored in includes/classes/form_sanitizer.php, and call it as FormSanitizer::sanitize_form_string.
Create dedicated sanitize form username, sanitize form email, and sanitize form password functions alongside a base form string sanitizer, then apply them in the registration flow to prepare sanitized inputs.
Create a config.php file in the includes folder to enable database communication, start sessions, and set the default time zone for data validation and login checks.
Connect to the MySQL database using a PHP PDO connection inside a try-catch block, configure error reporting, and gracefully handle failures to verify the Reese flicks setup.
Master PHP form validation by enforcing first name length between 2 and 25 in account.php, using a private error array and strLen checks, and pushing errors for register-page display.
Create a get_error function that uses in_array to detect an error in the error array and echo it above the corresponding first name field during registration.
Create a constants class to store all error messages as public static properties, include it in the form handling, and replace inline strings with constants so updates propagate across fields.
extend the user input validation by implementing a dedicated last name validation function, update constants and error messages to enforce 2–25 characters, and wire it into the register workflow.
Validate the username by applying the length check and updating username characters. Use a prepared php sql query to check the users table for the username and return username taken.
Build a PHP validate emails function that checks both emails match, validates format with filter_var, and prevents duplicates by querying MySQL, with clear error messages.
Learn to validate passwords in a Netflix clone project by checking PW1 and PW2 match, showing passwords don't match errors, and enforcing a 5–25 character length.
Style form error messages by wrapping them in a span with an error class, then apply CSS to color red, 14px font, 400 weight, center alignment, and advise refreshing cache.
Insert validated user data into the database using a dedicated insert function, hashing the password with sha-512 and binding first name, last name, username, email, and password via prepared statements.
Validate all user input and insert the user details when there are no errors, returning the query result. If successful, redirect to index.php and hash the password.
Debug MySQL queries by inspecting the query error info array and adjusting the insert user details function to fix issues like column not found.
Implement a login function in a Netflix clone by sanitizing input, hashing the password, and validating username and password with a select query in account.php, with error handling.
Store and check user login status with PHP sessions by starting a session, setting a $_SESSION['user_logged_in'] to the username, and redirecting if not set.
Remember the last entered values to keep user inputs on login and registration forms by reading post data and populating the username field with a get_input_value function.
Remember input values on the register page by reusing the login page approach, preserving first name, last name, username, and emails to streamline form corrections.
Set up three database tables for a netflix clone—entities, videos, and categories—by importing SQL scripts with sample tv shows, seasons, and episodes to power the video player and browsing interface.
Download the sample data zip, unzip it, and place the entities folder in your site root to populate previews, thumbnails, and videos for development.
Explore the database schema behind the Netflix clone, detailing the categories, entities, and videos tables, their fields, and how previews and thumbnails link to entities.
Create a reusable PHP preview provider class with a constructor for a connection variable and username, include it in index.php, and call create preview video to test.
Implement a random entity retrieval for previews, enabling category-filtered or random results. Create a private getRandomEntity function that queries entities with order by rand limit 1 and returns an entity.
Create an entity class in PHP that handles database data or IDs, initializes with a connection and input, and fetches data via a prepared query when given an ID.
Create and use an entity class in PHP to fetch and display data with getter methods for ID, name, thumbnail, and preview in a Netflix clone project.
Output an html structure for a preview video with a div class preview container, a hidden thumbnail, and an mp4 video. Autoplay muted, reveal the image after it finishes.
Split code into a header file by creating header.php in an includes folder and including it with require_once. Link the style sheet and prepare a wrapper div.
Apply full-width styling to the video and preview image, then create a translucent overlay using a positioned container, rgba black 0.3, and display:flex for the name and buttons.
Create a video preview overlay with a title and two buttons—play and volume—while planning a subtitle to track viewer progress and future continue watching.
Add Font Awesome icons to play and volume buttons by embedding the library, replace images with font icons, and use color inheritance to match the Netflix clone styling.
Master button hover effects by applying a CSS hover state to main details buttons, changing background to #e6e6e6 and text to #000, with icons inheriting color and a pointer cursor.
Implement a mute toggle for the preview video using JavaScript and jQuery, wiring a Script.js file, loading jQuery from a CDN, and toggling the video's muted property on click.
Learn to toggle the mute and volume icons by toggling classes in JavaScript, swapping font awesome icon classes to show volume up or mute based on user actions.
Implement a preview ended function that toggles the video off and reveals the preview image when playback ends, using onended to switch between preview video and hidden image.
learn to style the page background for a netflix-like clone by styling the wrapper with a minimum width, full height, and a 141414 background, then output the categories and entities.
Create a category container class in PHP to fetch all categories from the database and render them on the index page using a show all categories method.
Build a get_category_HTML function to format category title and items from SQL data, with optional title overrides and booleans for TV shows and movies during query iteration.
Create a static php entity provider class with get_entities to fetch entities by category id and limit. Build a prepared sql query against the entities table and return entity objects.
Learn to fetch and display categories and their entities by using the get entities function, handle cases for both TV shows and movies, and build HTML output through a loop.
Output HTML for each entity by building a preview square using the entity's id, thumbnail, and name, linked to the entity page, via a preview provider.
Style the entity previews for a Netflix clone by sizing thumbnails to 230 by 129 pixels, adding a four-pixel margin, and using inline-flex with object-fit: cover.
Style the category sections by converting the category container to a flex column, linking category titles to category.php?id=, and enabling horizontal scrolling for entities with hover color and no underline.
Add padding to the preview categories container, then create an entity page that reads the url id and shows the selected entity’s preview video.
Create a reusable PHP error message system by adding an error message class with a static show function that outputs a styled HTML banner, centered and above the nav bar.
Learn to build a season provider in PHP that outputs an entity’s seasons and the suggested videos, using a constructor, includes, and a create method.
Write a seasons retrieval flow using the season provider class to query videos for an entity, order by season and episode, and move the logic into the entity class.
Explore how to execute a SQL query in phpMyAdmin and organize the results into seasons and their videos using a video class and an entity class.
Create a PHP season class with a constructor and getters. Build a seasons array by grouping videos per season while looping and detecting season changes, then finalize the last season.
Iterate the seasons array to output season numbers in a clean HTML block, handling empty results and preparing to load videos for each season.
Output the video square html for each season by creating a function that retrieves a video's id, title, description, file path, and thumbnail from the video and its entity.
Learn to output episodes by building an HTML video grid with clickable thumbnails linking to watch.php?id=, using video info to show titles and descriptions, and looping over videos.
Style the episodes section of a Netflix clone by applying responsive CSS to season and episode containers, sizing images, aligning content, and enabling scrollable descriptions.
Build a Netflix-style 'you might also like' section by adding a show category function, passing category id and optional title, and applying a no-scroll style to stack previews.
Create a watch.php page, instantiate a video object with the given id, and increment the view count using a parameterized update query, then verify the increase by querying.
Display a video inside watch container with a video element, sourcing the file via a PHP get file path function, enable controls with a responsive width, noting Chrome autoplay restrictions.
Create a back button over the video using an absolute video controls container with a left arrow icon. Apply a transparent background and white color to match the Netflix-style interface.
Hook up the back button to navigate to the previous page by creating a go back function that calls window.history.back and wiring it to the button on click.
Teach how to hide the top banner after two seconds of mouse inactivity using a start hide timer, clearing and restarting a timeout, and fading the watch nav.
Create a video progress table in phpMyAdmin to track user, video id, progress in milliseconds, and finished status, with default zeros and a current timestamp, enabling resume.
Implement a video progress tracker that stores each user's viewing progress in a database, updating the last watched position to resume playback across sessions using video id and username.
Learn to track video progress with an update timer, insert a row via add duration, and send progress via a jQuery ajax post to a PHP endpoint.
Learn to pass video id and username data in an ajax call, include the config for database access, validate post data, and prepare to insert a row using PHP.
Insert the initial video progress by checking for an existing row for the user and video ID, then binding parameters and inserting with progress and finished defaults at zero.
Implement a video progress timer in JavaScript and jQuery: insert or update a progress row for the user and video, poll every 3 seconds with setInterval, and clear on end.
Update the video progress in real time by sending the current time, video id, and username every three seconds to update_duration.php to update the progress column.
Track user video progress by updating the progress column as the video plays and mark finished as true, resetting progress to zero when replaying.
Track user video progress and mark completion, then resume playback from the last saved time by loading progress via Ajax from get_progress.php and setting the video current time.
Implement the up-next video feature in a netflix clone using PHP, querying the videos database to fetch the next episode within the same season, or the next season if needed.
See how the video provider class selects the next video by season and episode, then falls back to the most viewed season 0 or 1 video excluding the current one.
Add an up next section on the watch page, fetch and display the next video title and season/episode via get up next, wiring the video provider and outputting the details.
Add a get season and episode function to display season and episode numbers for videos in Netflix clone, skip movies, and render on the watch page with a next-episode button.
Add and style a play next button in the up next area, with an icon and text, and connect restart and play actions to navigate to the next video.
Style the up next controls with height 100%, center content, remove button padding, and raise the watch navigation z-index to ensure clear visibility over overlays.
Create a restart video function that resets the video time to zero. Wire this function to the restart button in watch.php and fade out the up next container.
Hook up the play button to navigate to next video with a watch video function that takes the video ID and redirects to watch.php?id=VIDEO_ID, with the ID supplied from PHP.
Hide the up next overlay on page load and reveal it when the video ends with a show up next function and fade in, triggered by on ended.
Implement an inner join in your netflix clone app between the video progress and videos tables on video id, filtering by username and entity id to identify the next video.
Develop a get entity video function in the video provider to fetch the next video for an entity and user, using prepared queries with placeholders and a first-episode fallback.
Hook up the play button on the video preview by wiring it to fetch the selected video ID from the video provider and call watch video.
Add a subtitle to the video preview that shows season and episode when available, and hides it for movies, by creating a video object with video id and season-episode text.
Set the play button text to continue watching when the user has a video in progress by querying the video progress table for the video id and username.
Implement a seen-tracking feature by adding a has seen function and check mark icons to display already viewed videos in the Netflix clone, using Font Awesome and CSS positioning.
Implement a top navigation bar in header.php with a logo, home, shows, and movies links, plus search and profile icons, using a top bar and logo container structure.
Learn to style a fixed top navigation bar with a flex layout, responsive logo sizing, and a scroll-triggered transition from transparent to black.
Implement dynamic nav bar styling by changing the background color on scroll, toggle a scrolled class and enforce a minimum width of 1050px, and apply a smooth CSS transition.
Extract the nav bar into a separate file and conditionally include it with a hide nav flag on the watch page, so the nav disappears during video playback.
Learn to build a tv shows page and a movies page in a Netflix clone using PHP, SQL joins, and distinct queries to fetch tv show preview videos.
Copy the query into the entity provider’s get TV show entities function and adjust the where clause for an optional category id, then render the first result in preview video.
Refactor the category containers to show only tv shows by renaming the function to show tv show categories and passing true for tv shows and false for movies.
Develop and display a dedicated movies page in the Netflix clone by creating a movies.php, adding a movies preview video function, and fetching movie entities to showcase movie categories.
Modify the movies page to display only movie categories by renaming the TV show categories to show movie categories and updating the PHP entity provider to get movies.
Create a dynamic category page by wiring a category id from the URL to fetch and display category-specific entities, reusing movie page code and adding a category preview function.
Hook up the category page by calling the show category function with the category ID to fetch and display entities for that category.
Note: Videos used in the intro video are for demo purposes. We will be using 'free to use' content in the course - not actual licensed videos.
Do you want to become an expert in JavaScript, PHP and MySQL?
Do you want to build a real video streaming site just like Netflix?
If so, you’re in the right place! This course will guide you step by step in creating your own Netflix clone COMPLETELY from scratch.
We’re talking the kind of website that will amaze anybody that sees it. The kind of website that will get you hired in no time!
Why let me teach you?
I work as a Software Engineer at Microsoft where I build products used by millions of people all over the world! I want to take the skills I’ve gained through years of working with some of the best developers in the world and transfer them directly to you!
I’ve taught thousands of students here on Udemy and created some of the most popular development courses on Udemy!
Okay so what’s the course about?
I will personally guide you, step by step, in creating your own video streaming site just like Netflix complete with:
User registration
Movie streaming
TV Show streaming
Live search system
Paypal integration for paid accounts
and much more!
Whether you are a complete beginner* or an experienced programmer, this course will be massively beneficial to you.
Why should I take the course?
In the programming world, the “big 4” often consists of Google, Microsoft, Facebook and Amazon. To get a job at any of these companies, you absolutely MUST know the essentials: HTML, CSS, PHP, JQuery, JavaScript and MySQL.
If you take this course, you will have nothing to worry about because we use all of these skills extensively!
Support:
By enrolling in this course, you will have the COMPLETE support of a Microsoft Software Engineer (me). I'm always ready to answer any question you may have. Programming issues, errors, feature requests, general programming advice - it doesn't matter, I'm always happy to help! I always aim to respond to questions within a few hours and it's also worth noting that I've answered EVERY SINGLE question asked so far.
Future course discounts:
By enrolling in this course, you will get access to ALL of my current and future courses for the lowest possible discount we as instructors are capable of offering on Udemy - FOREVER.
Project portfolio:
The site you create in this course will be the highlight of your project portfolio! Any potential employer who see's this project on your resume will want to hear all about it. The reason? They know that a project like this means you're familiar with the wide range of technical skills they need their employees to know.
Fun!
Finally, this project is a lot of fun and I know you'll have a great time implementing your own unique ideas as well as the ones we implement together. What are you waiting for?