educational

Alternative File Protection

Editor's Note: The process of protecting content from theft can involve several strategies and varying tactics to stay one step ahead of thieves. While the most basic method of using .htaccess protection can be enough in many cases, in others, such as when you have a non-Apache web server, other techniques need to be developed. Here's an idea to help you develop your own strategy.

The process of linking directly to an image, or hot-linking, can be a serious drain on a webmaster's hosting bill. A number of different sources can hot-link an image, for just about as many reasons. Other webmasters can link directly to an image on your page, deriving revenue from their sites while sending you the bill. Surfers can post images in forums, displaying your proprietary content for non-members to freely view. Even Google's image search spiders can place your member's section within a few keystrokes of the average surfer.

Many strategies exist to combat hot-linking, but my favorite is prevention through obscurity. In a nutshell, thieves can't steal what they can't find. This article will provide an outline of this method, as well as the quick hack our technical team has implemented to demonstrate its functionality.

The Shell Game
When a hot-linker places your image on another site, they do so by providing a URL to a specific location, in this case, your server. What happens if the file is subsequently deleted or moved? You guessed it: a broken image on the thief's page. What better way to pay back a hot-linker than to protect your images while simultaneously disrupting their efforts?

Edge Productions maintains a large network of sites, some of which include movies. Please excuse our design mess and take a look at www.honeyvids.com. The site offers videos of well known porn stars, including Aria Giovanni, Alex Arden, and Amber Michaels. Shortly after the site's launch, we began to notice a rapid increase in the bandwidth consumption that couldn't be accounted for. By doing further checks into our logs, we discovered sites in China that were linking directly to the movies, thereby circumventing our ads and offers, and costing us money. To prevent this from happening, we decided to rename the files. This took an effort on our part to pull webmasters off of other projects simply to rename files and then update the HTML code. The hot-linking stopped for perhaps a week, and then came back stronger than ever.

A Better Mousetrap
By taking a reactive approach, we put ourselves on the defensive, chasing after hot-linkers and sticking our fingers into the holes in the dam. One of our developers came up with the idea of getting proactive instead, suggesting we implement an automatic filename swapping system, and we quickly gave it the green light. The system works in five parts. The first portion of the program makes a backup of the existing files, in case of corruption or an unforeseen mistake in the code. The second step is to take an accounting of the current filenames, and to generate brand new ones using a random alphanumeric string. The next part of the program processes the files, changing filenames and updating the HTML. The fifth step is to log the efforts and allow for debugging, should the process fail. We added the program to the nightly crontab process on the server, and let it run. After 6 months of running with the automatic swapping system, hot-linking has been stopped in its tracks, and users haven't reported any significant problems.

If you were expecting sample code, however, you would be much better off building a similar system yourself. Our spaghetti code leaves something to be desired. Good luck!

Copyright © 2024 Adnet Media. All Rights Reserved. XBIZ is a trademark of Adnet Media.
Reproduction in whole or in part in any form or medium without express written permission is prohibited.

More Articles

opinion

To Cloud or Not to Cloud, That Is the Question

Let’s be honest. It just sounds way cooler to say your business is “in the cloud,” right? Buzzwords make everything sound chic and relevant. In fact, someone uninformed might even assume that any hosting that is not in the cloud is inferior. So what’s the truth?

Brad Mitchell ·
opinion

Upcoming Visa Price Changes to Registration, Transaction Fees

Visa is updating its fee structure. Effective April 1, both the card brand’s initial nonrefundable application fee and annual renewal fee will increase from $500 to $950. Visa is also introducing a fee of 10 cents for each transaction, and 10 basis points — 0.1% — on the payment volume of certain merchant accounts.

Jonathan Corona ·
opinion

Unpacking the New Digital Services Act

Do you hear the word “regulation” and get nervous? When it comes to the EU’s Digital Services Act (DSA), you shouldn’t worry. If you’re complying with the most up-to-date card brand regulations, you can breathe a sigh of relief.

Cathy Beardsley ·
opinion

The Perils of Relying on ChatGPT for Legal Advice

It surprised me how many people admitted that they had used ChatGPT or similar services either to draft legal documents or to provide legal advice. “Surprised” is probably an understatement of my reaction to learning about this, as “horrified” more accurately describes my emotional response.

Corey D. Silverstein ·
profile

WIA Profile: Holly Randall

If you’re one of the many regular listeners to Holly Randall’s celebrated podcast, you are already familiar with her charming intro spiel: “Hi, I’m Holly Randall and welcome to my podcast, ‘Holly Randall Unfiltered.’ This is the show about sex, the adult industry and the people in it.

Women In Adult ·
trends

What's Hot Now: Leading Content Players on Trending Genres, Monetization Strategies

The juggernaut creator economy hurtles along, fueled by ever-ascendant demand for personality-based authenticity and intimacy — yet any reports of the demise of the traditional paysite are greatly exaggerated.

Alejandro Freixes ·
opinion

An Ethical Approach to Global Tech Staffing

One thing my 24-year career as a technologist working to support the online adult entertainment industry has taught me about is the power of global staffing. Without a doubt, I have achieved significantly more business success as a direct result of hiring abroad.

Brad Mitchell ·
opinion

Finding the Right Payment Partner

Whenever I am talking with businesses that are just getting started, one particular question comes up a lot: “How do I get a merchant account?” It’s a simple question, but it has a complicated answer.

Jonathan Corona ·
opinion

The Taxman Cometh for Every Business

February may be the month of romance, but it is also a time when we need to think about something that inspires very little love: taxes. April is not far away, and the taxman is always waiting. This year, federal and most state income taxes are due Monday, April 15.

Cathy Beardsley ·
opinion

The Continuous Journey of Legal Compliance in Adult

The adult entertainment industry is teeming with opportunity but is also fraught with challenges, from anticipating consumer behavior to keeping up with technological innovation. The most labyrinthine of all challenges, however, is the world of legal compliance.

Corey D. Silverstein ·
Show More