Protect Your Site Against UserCash and Other Scumbags

Post #451 categorized as Websites, last updated on Dec 3, 2007
Tagged with ads, frames, javascript, security, tutorials

In this brief article I explain the atrocity that is UserCash and then provide the JavaScript needed to protect your site.

What is UserCash?

UserCash is an online advertising program that uses redirects and frames to exploit your site with advertisements. UserCash customers link to target sites using rewritten URL’s generated via the UserCash “generator/compiler.” There are two types of these rewritten UserCash links:

As of now, all UserCash links assume the following generalized format:

http://1z2l3e4gt6y44k7wqld9.usercash.com

UserCash then pays 70 cents (or less) for every 9999 top-frame clicks or 70 cents for every 3999 landing-page clicks. Let’s just pause for a moment to contemplate the implications of this idiocy:

I find it remarkably sad that there are people who are eager to force scummy spam ads upon others just to make a quick buck. It is also utterly pathetic that people are willing to sell out their own sites with such a blatantly cheap advertising stunt. Nonetheless, rather than continuing with this rant, let’s focus on a way to protect our sites against UserCash and any other site that tries to frame our pages..

Protect your site against UserCash and other framing scumbags

Fortunately, preventing scumbags such as UserCash from placing ads on your site is relatively easy. Simply link to or place the following JavaScript in the <head> of your web pages:

<script type="text/javascript">
<!--//--><![CDATA[//><!--

// break out of frames @ http://perishablepress.com/press/2007/12/03/protect-your-site-against-usercash-and-other-scumbags/

if (top.location != self.location)
top.location = self.location;

//--><!]]>
</script>

With this code in place, your pages will automatically “break out” of any enclosing frames. Of course, this method requires that JavaScript be enabled on the visitor’s browser, which happens to be the case for a large majority. When JavaScript is available, this code is highly effective at breaking your pages out of frames. This trick was taken from my article, HTML Frames Notes Plus.

Subscribe to Perishable Press


27 Responses

TopLeave a comment

[ Gravatar Icon ]

#1psilo

thanks, I had worked out another solution but yours is much simpler, going with it. damn usercash..

[ Gravatar Icon ]

#2Perishable

Glad to hear it’s working for you, psilo — usercash doesn’t deserve any business that is attained by stealing from people!

[ Gravatar Icon ]

#3J.K.

I totally forgot to do this when setting up my blog, and this is the second time I’ve been helped by this site. - Thanks!

[ Gravatar Icon ]

#4Perishable

My pleasure — glad to be of service! ;)

[ Gravatar Icon ]

#5Webmaster

Fantastic, works for me. Have installed your solution to all of my sites under my banner KMPNetwork. Can’t thank you enough.

[ Gravatar Icon ]

#6Ryan

I don’t think its the right approach to be blocking sites that could drive traffic to your sites.

[ Gravatar Icon ]

#7Perishable

@Webmaster: Thanks for the feedback — much success to your domains! :)

@Ryan: Thank you for your honest opinion, however, this method does not block any sites whatsoever — it simply prevents thieves from stealing content by removing unwanted advertising frames. Traffic is definitely not blocked — in fact, removing frames helps to “pull” traffic into the actual target site.

[ Gravatar Icon ]

#8MH

lol, someones mad cuz people like to make money online.

[ Gravatar Icon ]

#9nikolai

please dont make such comments about a site that you dont even know about.. if it was illegal what they were doing they wouldnt last this far… usercash has helped me a lot.. right now i am earning at least 250dollars a month with usercash.. and thats all that matters..

[ Gravatar Icon ]

#10Mike Lee

Nikolai is a liar. He owns usercash.com.

View here:
http://www.blacklabelads.com/mb/commerce/purchase_form.php?zone_id=78150

And see his site in the descriptions!

[ Gravatar Icon ]

#11Perishable

No, nikolai, you are wrong. Making money is definitely not “all that matters.” It is that very attitude that continues to ruin the Web for the rest of us. Let’s do the math on this one. If UserCash is paying roughly $70 per million ads, then someone such as yourself claiming to make $250 per month is guilty of polluting the Web with over 3.5 million servings of those atrociously sleazy UserCash advertisements every month!

[ Gravatar Icon ]

#12DONT CARE PERSON

i really don’t care on what you think or say .. i just think that your a scumbag yourself for your reckless title…

[ Gravatar Icon ]

#13Perishable

Ahhh, the irony of it all.. ;)

[ Gravatar Icon ]

#14Lucy

This is really useful, thank you very much!!

Some time ago I visited a blog, but in every post/page/link I tried to see, I was redirected to the usercash link, and my McAfee Site Advisor kept on popping up a warning all the time.

Then I contacted the blog’s administrator and asked him why his blog was being redirected to usercash… I thought it could be a trojan infection on my pc, I got that terrible sticky Vundo/Virtumonde a few weeks ago.

But he replied to me saying he was an usercash partner and he was earning money from the links…

It totally turns the navigation a mess!! I really hate this stupid usercash.


Your little light switch is very cool!! :D

[ Gravatar Icon ]

#15Perishable

Yes, indeed, Lucy — I completely agree with you. It’s too bad there are so many mindless money whores ruining life for everyone else just to stuff their pocket holes. I could seriously rant on this topic for days, but I think you get where I am coming from.. ;)

also, glad you like the light switch! :)

[ Gravatar Icon ]

#17Jeff Starr

Nice try, scumbag! ;)

[ Gravatar Icon ]

#18Tony

Very nice tip Jeff.
Are you implementing it through .htaccess now? I couldn’t find it in the source code…
But I did find that warning about a Blackhole, and now I *really* want to go there!!! :-D

[ Gravatar Icon ]

#19Jeff Starr

@Tony: I have this technique implemented through an external JavaScript file. I had disabled it for awhile due to usability issues with Google Reader and a certain Greasemonkey script, but thanks to morons like Bob (comment #16), I had no choice but to restore its functionality. And of course, you don’t want to follow that blackhole link!! ;)

[ Gravatar Icon ]

#20dennyhalim.com

you can also put base target="_top" within the head section and it always works. even with js disabled.

[ Gravatar Icon ]

#21Jeff Starr

Hi Denny, thanks for sharing that tip with us. It may just the trick I am looking for to workaround the JavaScript method interfering with certain Google-reader/Greasemonkey scripts. Looking forward to trying it out — thanks!

[ Gravatar Icon ]

#22Sam B

I’m working on a forum and I came across the usercash site and I, honestly, didn’t understand the exact setup on how it works. The site itself is kind of vague, at least to my understanding. So I searched usercash.com on Google and your post came up. I’m very glad I I read it! Thank you for preventing a lot of trouble!

Sam

[ Gravatar Icon ]

#23Jeff Starr

@Sam B: My pleasure — glad to be of service! :)

[ Gravatar Icon ]

#24Jawns Lover

Well just because someone CAN try to use usercash on your doesn’t mean the whole concept is trashy. Irony is this is what usercash framed links use to ensure that none of the links is framed themselves.. and something I was looking to use so I can try & script my own usercash-like thing-a-majiggie

[ Gravatar Icon ]

#25metalHurricane

Usercash was working fine for me for over a year. I was up over a dollar (unfortunately you need 5 or more to be paid) but I’ll admit, the site was organized horribly. On the other hand, if anyone clicked these garbage ads they deserve to see where they link to. As far as i’m concerned, placing unobtrusive ads that no one would ever want to click and getting money for it is perfectly fine.

But now they are defunct and i have to change hundreds of links to the direct link rather than ____.usercash.com. I’m not wasting my times with sites like this in the future.

[ Gravatar Icon ]

#26Monika

Nice tips to Protect Your Site against Scumbags; and how to avoid such frames and advertisements by using code.
Thanks

[ Gravatar Icon ]

#27Jeff Starr

@Jawns Lover: Thanks for the comment, but I respectfully disagree with you. I think the whole concept is extremely trashy. I would never condone it, but to each his own, as they say.

@metalHurricane: lol - their site was pretty atrocious! I’m glad to hear they are no longer in business — Good riddance! ;)

@Monika: Absolutely my pleasure — thanks for the positive feedback :)

Share your thoughts..

TopRead official comment policy

The rules are simple. Comment intelligently. Stay on-topic. Don’t spam! Suspected spam will be deleted. Use your real name or nickname, not a site name or business name. Using a site name or business name is a good way to get your link or comment removed. Certain comments are moderated; if your comment does not appear after several days, or if you wish to comment privately, contact me. Also, by posting a comment, you grant this site a perpetual license to reproduce your comment, name, and website URL. Lastly, you may use basic HTML markup, but please do not use <pre> tags. Instead, wrap your code with <code> tags. Use a new set of <code> tags for each code term or phrase, as well as for each individual line of code (i.e., multiple lines of code require multiple code tags). Please see the complete comment policy for more information.