- Home /
How can I stop iframe theft of my Kongregate game?
I entered a game in the Kong contest, but it's not the final version of the game... just the best I could do with the time available. I want to keep this crappy version from getting too widespread, so I site-locked the game (checking the Application.absoluteURL to make sure it is on Kongregate.com).
However, thieves are still swiping the game by putting it in an iframe. Normally you could easily stop iframe theft with a call like:
Application.ExternalEval("if (window != top) { document.location='http://kongregate.com'; }");
But Kongregate.com actually loads their game within an iframe all the time. So the game is ALWAYS in an iframe.
I figured I'd make sure the game is at least iframed by the right person. Kong's iframe is hosted on "a.kongregate.com" so I figured I'd check that. But the thieves who are taking the game are simply iframing Kongregate's iframe! Thus, it always looks like the right place. The iframe really is Kong's iframe...
How can I stop this iframe-based thievery? (And yes, in this case it's thievery, because I can see that they saw the sitelock message saying it was not to be distributed, and they went ahead and iframed it anyway to get around that.)
I may be wrong but i strongly believe it's impossible to 100% secure it. A polite message telling them you will sue them goes a long way though.
Answer by AKAssassin · Apr 29, 2011 at 05:17 PM
If you now that Kong puts it into and iframe and they are iframing into an iframe just check up the parent tree to see how many levels of iframe your game is in.
If it is in more than 1 level deep of iframe don't start the game. Then if it is one level of iframe check where the parent window is. Might secure it a little bit more...
Your answer
![](https://koobas.hobune.stream/wayback/20220613105352im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Need help uploading to internet! 0 Answers
How do I know if my game is connecting to Kongregate's API? 2 Answers
How to check iframing into a iframe? 2 Answers
Kongregate 1 Answer
Kongrete API 1 Answer