Results 1 to 4 of 4

Thread: Using php to hide video embed urls?

  1. #1
    Join Date
    Mar 2008
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Using php to hide video embed urls?

    I'm looking for a way to hide embeded videos urls completely. I've found one script that lets you do it with a data base but it was very very pricey. What it does though is runs the video through a embeded player on my site instead of theres and encrypts the url using xml I believe. If anyone knows of a script out there thats cheap or if you can help me please let me know.

    I would also be willing to pay someone to do this for me.

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    How much do you know about PHP and MySQL? It wouldn't be too hard to create-- I've done it already, myself.

    What you do is something like this:
    Store an ID and location in a MySQL databse (or a flat file)
    Put all videos in a folder with an .htaccess file that blocks access to all contents in the folder for everyone
    Create a php script that reads in a particular file and then outputs it

    So, for example, instead of the embedded file source being www.mysite.com/files/movie.avi the url is www.mysite.com/download.php?file=1
    download.php would find the entry in the MySQL databse with an ID of 1, grab the associated location, and then read in the file at that location and output it as though it were actually the file. You player won't know the difference, and neither will the user.
    You can also put some security in the PHP file, so that only users who are logged in can access the files.
    Last edited by Jas; 05-19-2008 at 03:20 AM.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. #3
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    How would you do the "Store an ID and location in a MySQL databse (or a flat file)" like in the example above?

  4. #4
    Join Date
    Mar 2006
    Posts
    600
    Thanks
    5
    Thanked 4 Times in 4 Posts

    Default

    Quote Originally Posted by parthatel View Post
    How would you do the "Store an ID and location in a MySQL databse (or a flat file)" like in the example above?

    well if you are using a flatfile you could do one of two things.. store the data in your flat file like this:
    Code:
    25||/videos/cars.avi
    25 being the ID and /video/cars.avi being the location of the video..
    use php's explode() function to split the two up..

    or you could just have ID numbers by the row in the text file.. But I and I am sure most people would recommend you using the explode() function..

    If using MYSQL just add a column with IDs and a column for fileNames. Simple as that.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •