Use the PHP SDK example in an existing website or download the complete demo to run this sample locally. The complete demo requires PHP 8.2+ and cURL.
Try DRM-X player for web
Play a protected sample here or open it in the DRM-X player app on a supported device.
Sign in to play
New here? Enter a username and password and choose Create account.
Open in the app
Run the installer. Return here, choose the app icon beside a title, and allow your browser to open DRM-X player app.
Open the APK and tap Install or Update. Return to this page in the same browser and tap the app icon beside a title.
Quit DRM-X player app, open the ZIP, and move the app to Applications. If Finder asks, choose Replace. Open the installed app once, then return here and click the app icon beside a title.
The iPhone and iPad beta is by invitation. Open your DRM-X player app invitation in TestFlight, tap Install, then return here in Safari. If you have no invitation yet, choose Play in browser.
Choose a device to see installation and playback options.
PHP setup and sample code
How it works
Your PHP server verifies the viewer’s access, maps the title to an authorized Content ID and requests a DRM-X playback session. Server credentials stay on your server. Register DASH or HLS URLs in DRM-X first if you host the encrypted media yourself.
Try your own video
- Extract the complete demo ZIP and open config/drmx.php.
- Set siteId, siteKey, accessKey and content.id from the same DRM-X environment, then select vod or live to match the package.
- Run a launcher below, visit http://127.0.0.1:8086/ and press Play.
# Windows PowerShell
powershell -NoProfile -ExecutionPolicy Bypass -File .\run-local.ps1
# macOS / Linux
bash ./run-local.sh
Connect your own sign-in and permissions
Disable demo sign-in in production. Connect authenticated_user_id() and user_can_play_content() in src/bootstrap.php to your current login and permission rules. Recheck access before every new session.