windows - Protecting an ASX file in PHP -
I only have a member on my site where users can log in and view windows media streaming content.
I have created a PHP script to serve the ASX file, but I can not validate it with session information. I think this is because the WMP is requesting and there is no php page.
Can anyone recommend a great way to protect ASX files?
What should I do. PHP session ID is included in ASX request. Generally this identifier is stored in a cookie, and every page goes to PHP on the request. In this case, WMP is not sending a cookie, so you have no way of knowing whether the request is authenticated or not.
When you download the link out of the ASX file, the nail on the session identifies as a GET variable:
$ download_link = "http: // myserver. Com / download_asx_file.php? " $ Download_link = "F = $ file_id"; $ Download_link = Htmlspecialchars (SID);
Now when you call session_start ()
at the top of download_asx_file.php
You should find and load it as you normally would for certification.
Note : SID continuous evaluation at PHPSESSID = 12345678
(or that user should have a session)
Comments
Post a Comment