Premium Media Script
Premium Media Script is a PHP script that allows you to run your own media website.
Documentation on how to set up and use Premium Media Script. You will understand how to use all of its features including configuration and its API. This guide also covers all of its major features. If you stumble upon an issue or need help, please contact us.
License
Two types of license are available: Regular or Extended. If you are using this script for multiple websites, you must buy a license for each of them.
Items purchased under a Regular or Extended License may NOT be redistributed or resold "as-is" or as part of any other collection. You do not own the software but simply own a license to operate it; the author retains full rights.
Regular License Examples (from Envato)
Use, by you or one client, in a single end product which end users are not charged for. The Regular License could be used for:
- Single website (commercial, personal, or non-profit).
- Single website for a client.
- Single intranet site project.
Extended License Examples (from Envato)
Use in a single end product which end users can be charged for. The Extended License could be used for:
- An online service where the file can be displayed on multiple users' pages.
- Part of a software package for sale such as SaaS.
Installation
The installation of this script is very trivial. Simply follow the instructions below and you will be ready to launch your new media site in about 5 minutes.
- Upload and extract the compressed file main.zip to the root of your server.
- Make sure that the folder content and all of its sub-folders are writable (Permission 755).
- Point your browser to your site and you should be redirected to the installer. If not, go to https://yoursite.com/install.php
- Once on the installer, read and follow instructions as the installer will guide you through the installation.
Upgrading
All upgrading instructions are detailed in "upgrade.html" located in the Documentation folder. Simply open that and follow the instructions according to the version of the script. Please note that some updates may require you to replace all files while others only a couple of files. In both cases it is strongly recommended that you first backup all your existing files and download them to your computer.
Migration
To migrate from one server to another, you need to proceed with care to not lose any data or functionality. Please follow the instructions below without skipping anything.
- Enable maintenance mode in the admin panel > settings.
- First backup and download all your files (compress and download).
- Go to phpMyAdmin > your database > export the database.
- On your new server, go to phpMyAdmin > new database > import the SQL file.
- If you are changing your domain name, go to the settings table and change it under "url".
- On your new server, upload and extract the compressed files.
- Open the file includes/Config.php and change your database info manually.
- Finally, login as admin and disable maintenance mode.
Features
Here is a glimpse of some of the most awesome features this script has to offer.
Import Media
Import whatever you want and however you want. A lot of effort has gone into the import system so you can import from major sites like Youtube, Vine, Vimeo, Dailymotion, etc.
- Import using the URL to the video.
- Import using the Bookmarklet found in the admin panel > Import a Single Video.
- Mass Import from Youtube using the live admin interface.
Add Custom Media
You would rather upload custom media? No problem. Use the interface to upload video and image files of the following format: mp4, jpg, png and gif. Please note that this script does not convert videos nor does it generate thumbnails from videos.
Featured and NSFW
You can tag a media file as featured and/or NSFW. Featuring a video will prioritize it; tagging as NSFW will prevent users who have NSFW disabled from viewing. Make sure to add the minimum age required to register in your TOS.
Report
Registered users can report any content (media file, user or comment). You can moderate reports via the admin panel.
Categories and Types
Assigning a type to media is important. The built-in types are video, music, vine and picture. You also have to properly assign a type to the categories.
User Profile and Subscription
Users can subscribe to each other and receive notifications when there is new media.
Settings
Once installed, login as admin and you will see your admin bar at the top. Look for Configuration to configure the script.
General Settings
Under this tab you will find the important settings. The email field is used as the sender when the script sends email. Filling the social links will activate sidebar widgets.
Application Settings
This tab groups the main settings. The "Blacklist Words" field is used to filter bad words and replace them with an asterisk *. Separate words with a comma.
Security Settings
You can enable captcha (reCaptcha or Solvemedia) to prevent bots from creating accounts or submitting forms. For Solvemedia, add the keys in includes/library/Solvemedia.php.
Media Settings
These settings allow you to change how media looks and upload settings. The display mode can switch the script from a Youtube-style to a 9gag-style. Local Thumbnails: Do not change this after you have uploaded your first media; thumbnails are stored in /content/thumbs. Maximum Upload Size: Determined by your server; the script will use the lower of your setting and the server limit.
Advertisement Configuration
Add any advertisement code; you can enable or disable ads with a single click. Main sizes: 728×90, 468×60, 300×250. There are also slots for video pre-roll and a responsive ad for mobile. You can display ads using PHP where SIZE can be 728, 468, 300, or rep:
<?php echo $this->ads('SIZE'); ?>
Social Login
The script includes authentication from Google, Twitter and Facebook. Follow the instructions below for each. oAuth is strict with the Callback URL—use the exact URLs mentioned.
Facebook Connect
Go to developers.facebook.com, create a new app, and fill App Domains and Site URL. For oAuth Callback use https://yoursite.com/user/login/facebook. Paste the keys in admin settings.
Callback URL
https://yoursite.com/user/login/facebook
Twitter Connect
Register your site at Twitter, create an application, and add callback https://yoursite.com/user/login/twitter. Copy Consumer Key and Consumer Secret to admin settings. Enable "Allow this application to be used to Sign in with Twitter" in the app settings.
Callback URL
https://yoursite.com/user/login/twitter
Google Connect
Go to Google APIs Console, create credentials (Web Application), add your domain under Authorized Javascript Origins and https://yoursite.com/user/login/google under Authorized Redirect URI. Add the client ID and secret in the admin panel.
Callback URL
https://yoursite.com/user/login/google
API
The script comes with a custom API. Enable it under admin "Social & API Settings" and set a custom API key. For all requests, send the key parameter with your API key.
Media Endpoint
Retrieve information for a particular media: GET /api/view/UNIQUEID
| Parameter | Description |
|---|---|
| key | (required) Your API key. |
Search Endpoint
GET /api/search/KEYWORD — Parameters: key (required), limit (required), order (optional: views, date, votes), page (optional).
User Endpoint
GET /api/user/USERNAME — Get a user's media. Same parameters as Search: key, limit, order, page.
Frequently Asked Questions
The installer is stuck at step 3 and I see a blank page.
A common cause is that the script could not open or write includes/Config.sample.php. Check if your DB info was saved; if not, replace the placeholders manually. Another cause is that the script could not rename Config.sample.php to Config.php—do this manually.
The time is showing as a negative or huge value.
Your server timezone is not set correctly. Open includes/Config.php and set your timezone. You can get it from php.net/manual/en/timezones.php.
I keep getting a 404 whenever I click on something.
You did not upload .htaccess or your server does not support mod_rewrite. Upload .htaccess to the root or create it with the appropriate rewrite rules for the admin panel and application handler. Include an ErrorDocument 404 directive pointing to your index.
© 2026 GemPixel. All rights reserved.