Use VG Authorization MD5 Ticket Access

This section provides introductory information about how to integrate VideoGuard into your existing systems. It is not necessary to run web server and WMS in the same machine.  VideoGuard can be used in a different environments. 

The system time in web server and WMS must be in sync.

In the PHP page:

<?php

//The Format: HashedValue|Timestamp|validseconds|userIP|UserName|PreviewTime|PPMToDB|PPMToWMS|TicketKey

//The MD5 Ticket key configured in the WMS.
$WMS_TICKET_KEY="fdsaj934Jhg76";

$wmsserver = "my_media_server" ;
$timestamp = time();
$validseconds = 100000;

$userip= "*"; //support the wildcard
$username="Chris";
$previewtime=15; //15 seconds
$ppmtodb=0;
$ppmtowms=0;

$ticketcontent=$timestamp . "|" . $validseconds . "|" . $userip . "|" . $username . "|" . $previewtime . "|" . $ppmtodb . "|" . $ppmtowms ;
$hashedvalue = md5($ticketcontent . "|" . $WMS_TICKET_KEY);
$ticketstr = $hashedvalue ."|". $ticketcontent ;
$videourl= "mms://$wmsserver/ticketaccess/test.wmv?TICKET=" . urlencode($ticketstr) ;
die("<html><body><script>document.location='$videourl';</script></body></html>");
?>