• 0

Stealing Video Bandwidth Thieves


Question

Hi,

I have a video website, and it hosts all the videos on the server. However, there are some websites who are stealing bandwidth by streaming video from my server on theres.

To protect the direct URL of the video files, here's what I got set up.

- The direct URL is stored in the database.

- A PHP file basically takes in the video id, fetches the direct url, and streams the contents.

So, even if the direct URL is not known, the thieves can actually just stream it by calling the php file, with the supplied ID.

Is there any way I can protect and make sure the videos are served only in my domain?

Link to comment
https://www.neowin.net/forum/topic/840812-stealing-video-bandwidth-thieves/
Share on other sites

7 answers to this question

Recommended Posts

  • 0

When a visitor comes to your website give them a video key that is generated unique to each user. Now set up the php video url fetcher to see if this key is present. So when they call the php script directly since the key is not there you know they are directly linking.

  • 0

Hi,

You could try setting access with sessions, where if user tries to visit a video without access tehy are taken to your main webpage instead. Please ntoe this is a quick fix, and is probably exploitable with a bit of effort, but I'm still hungover to think of something better right now. :)

  • 0
Nice, I like that idea. It's a quick fix, but what if people like open the website URL first making it look like a Browser request, and then calls the php script? Then the server will think it's an actual user. Is there any other way?

Not if you keep changing the key every time the page is loaded. In order to set this up have the links to videos in your pages as below...

www.site.com/video?key=HGJYKJHK234kjh234234k?id=dfsdf7dsf8sdf9sdf

Where id identifies the video and key is regenerated every time the page is reloaded. Now when a legit user clicks on a link you can check the key stored as a session or in the database. Also have a time limit on the validity of the key. That way they can not save the key. Now in order for the link to work they will have to load the page every time to get a fresh key.

  • 0

would something like this work?

key.php: stores some random string in a variable (let's say, $key)

fetchurl.php: has a function which fetches the direct url; checks to see if $key is correct.

every_single_page.php: include both key.php and fetchurl.php, then use the function from fetchurl in this page itself. instead of passing the movie id to fetchurl.php via GET.

that way all direct calls to fetchurl won't work, and you also don't have to waste time generating random keys each time.

  • 0
would something like this work?

key.php: stores some random string in a variable (let's say, $key)

fetchurl.php: has a function which fetches the direct url; checks to see if $key is correct.

every_single_page.php: include both key.php and fetchurl.php, then use the function from fetchurl in this page itself. instead of passing the movie id to fetchurl.php via GET.

that way all direct calls to fetchurl won't work, and you also don't have to waste time generating random keys each time.

This can be defeated by requesting the every_single_page.php and then scraping out the url.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • You are clueless. The updates are done in the background so the next time you open Edge the updates are applied automatically. There is no need to close all your tabs. Just keep browsing like you normally do. Clearly you don't use Edge and are just one of those haters that complain for the sake of complaining.
    • I don't get this David. Can you explain it please.  
    • Microsoft is busy. Lots of changes to be released imminently for Windows server or soon. Also, lots happening for next version as well. Third party virus scanning software is being moved out of Kernel mode to avoid repeat of Crowdstrike incident. Windows Protected Mode and Windows Ready Print no longer require third party print drivers to be installed. New storage stack being developed. New NVME drivers now available for Windows Server 2025 to improve local NVME drive performance by 60+ percent. NVME-Of of fabric being worked on for next release to improve network access to NVME drives. ReFs (next file system) now has ability to boot and will become default file system in next release of Windows Server. ReFs improves on NTFS in several areas including resiliency and reliability and scalability. New update stack is being worked on to unify Windows updates, and updates for drivers and first party/3rd party application software. A stricter and more robust third-party driver certification program (ODI) is being worked on to improve performance, thermals, battery life, and reliability on modern Windows hardware by tightening how OEMs and IHVs (Intel, AMD, Qualcomm, NVIDIA, etc.) build and ship drivers. There is a tone more but too numerous to mention.
    • Now disable that stupid OneDrive backup request when Windows starts please. So unbelievably frustrating to only have “remind me later” instead of “no and never ask me again”
    • Hello, The Media Creation Tool is still at v10.0.26100.7019 from October 2025. Just looks like the backend has been updated. Regards, Aryeh Goretsky
  • Recent Achievements

    • One Month Later
      Markus94287 earned a badge
      One Month Later
    • Week One Done
      Markus94287 earned a badge
      Week One Done
    • One Year In
      Markus94287 earned a badge
      One Year In
    • Dedicated
      truespursfan earned a badge
      Dedicated
    • Rookie
      restore went up a rank
      Rookie
  • Popular Contributors

    1. 1
      +primortal
      508
    2. 2
      +Edouard
      169
    3. 3
      PsYcHoKiLLa
      154
    4. 4
      ATLien_0
      90
    5. 5
      Steven P.
      79
  • Tell a friend

    Love Neowin? Tell a friend!