Protect Your Site Against UserCash and Other Scumbags

by Jeff Starr on Monday, December 3, 2007 27 Responses

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:

  • Links that use frames to create banner-like ads above your pages
  • Links that use frames to deploy landing-page ads before your pages

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:

  • UserCash is paying people to exploit sites that may not belong to them.
  • UserCash advertisements are low-quality, unwanted cheap spam junk ads.
  • UserCash pays 70 cents for 9999 ads, or, 70 bucks for a million ads.
  • UserCash is littering the Web with their cheap garbage advertisements.
  • UserCash will pay people to put garbage ads on any site — even yours.
  • Even Google is susceptible to this type of advertising (see screenshot).

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.

About the author

[ Jeff Starr ]

Jeff Starr is a web developer, graphic designer and content producer with over 10 years of experience and a passion for quality and detail. Jeff is co-author of the book Digging into WordPress and strives to help people be the best they can be on the Web. + Follow Jeff on Twitter and subscribe to Perishable Press for quality web-design content delivered fresh.


27 Responses

Add a comment

[ Gravatar Icon ]

psilo#1

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

[ Gravatar Icon ]

Perishable#2

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

[ Gravatar Icon ]

J.K.#3

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 ]

Perishable#4

My pleasure — glad to be of service! ;)

[ Gravatar Icon ]

Webmaster#5

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

[ Gravatar Icon ]

Ryan#6

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

[ Gravatar Icon ]

Perishable#7

@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 ]

MH#8

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

[ Gravatar Icon ]

nikolai#9

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 ]

Mike Lee#10

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 ]

Perishable#11

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 ]

DONT CARE PERSON#12

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 ]

Perishable#13

Ahhh, the irony of it all.. ;)

[ Gravatar Icon ]

Lucy#14

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 ]

Perishable#15

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 ]

Jeff Starr#17

Nice try, scumbag! ;)

[ Gravatar Icon ]

Tony#18

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 ]

Jeff Starr#19

@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 ]

dennyhalim.com#20

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

[ Gravatar Icon ]

Jeff Starr#21

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 ]

Sam B#22

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 ]

Jeff Starr#23

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

[ Gravatar Icon ]

Jawns Lover#24

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 ]

metalHurricane#25

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 ]

Monika#26

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

[ Gravatar Icon ]

Jeff Starr#27

@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..

Read Comment Policy

Comment Rules: No spam. No profanity. Use your real name. You may use simple HTML tags for style. Wrap all code in <code> tags. Learn more.



Attention: Do NOT follow this link!