Prevent Direct Access to PHP file Add the following lines to the top of your PHP file. Open PHP file in a text editor Open terminal and run the following command to open form.php in a text editor. Is this what you mean? (No cookies needed. How to Prevent Direct Access to PHP File 1. &showstop=true&autostart=true&bufferlength=3" If I do this inside caller.php (in the “file=” part below) the fopen and fread gets executed while the page loads, taking really long to load and breaking the player…not sure why, but it works fine if “file=” points to another php file (get.php) that streams the mp3. get.php basically fopens and freads the requested mp3 file and sends to the user. If get.php called directly without hash or with old hash, it would deny.ĭid I get this am actually embedding a flash player in a page using code similar to that below.However, the user can still manually download the video file. But you can easily access it from your code like this: 1 This prevent file access from the URL but you can still see it in the browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |