Iframe beveiliging nodig...

Status
Niet open voor verdere reacties.

Jelle Mees

Nieuwe gebruiker
Lid geworden
25 nov 2006
Berichten
2
Ik heb deze vraag al op zoveel forums gesteld, niemand kan mij helpen :(
De meeste java-forums zijn Engels, ik hoop dat jullie het niet erg vinden dat ik mijn vraag niet vertaal naar het Nederlands...

Hi everyone. I have been searching for this script for some time now ( 2 weeks ), and still I am not able to find what I need.

My problem:

This is my website:
http://www.clantoolz.com/flemisharmy

I did not build this website, the website is build and hosted by clantoolz.com . The only thing I can do is modifie the website with html.

Javascripts don't work clantoolz.com websites. Well...actually they DO work, but only if you put the javascript on ONE line. If you use multiple lines, it won't work. That really sucks because it's to hard to work on an MP3 Jukebox player if I have to put all the code on one line.

That's why I started to build the MP3 player on another webserver. I made the MP3 Jukebox player and everything works. This player will start playing a random song on my web-server. Every time you revisit the page ( or refresh ) you will hear another song.

Here is the link to my MP3 Jukebox ( it will redirect to google ):
http://www.faclanhosting.be/FlemishArmySite

If I want that Jukebox player on my other website ( clantoolz.com/flemisharmy ), I have to use an Iframe offcourse.

BUT, if I can use an Iframe then everyone can. Everone can put an Iframe on there site with my MP3 Player page in it! I don't want that.

The one and only website that should be able to put an Iframe around my MP3-player page is the website http://www.clantoolz.com/flemisharmy.

I have no problem with people accessing the MP3 Player page, not at all, but I don't want them to use an Iframe on it so that they can take credit for MY work ( and beleave me when I say , it's a lot of work ).

Long story short:
- Iframe has to work on *clantoolz.com/flemisharmy* pages
- Iframe may not work on other domains ( redirect or something )
- Direct link to the web-page has to be possible

This is what I tryed:

<SCRIPT LANGUAGE="JavaScript">
if (top.frames.location == "*clantoolz.com/flemisharmy*") {
top.location = "*clantoolz.com/flemisharmy*";
}
else
{top.location = "http://www.google.be"}
;
</SCRIPT>

This is not working. I I use this script:
- Direct link to the player-page doesn't work ( it has to )
- Iframes still work on EVERY domain ( should only work on clantoolz.com/flemisharmy )

I really hope that you guys have the knowledge to write a script for me that will only allow *clantoolz.com/flemisharmy* pages to put an Iframe to my player-page.
 
ik denk niet dat je wildcards kan gebruiken met javascript, heb je al eens geprobeerd met de volledige url?

--Johan
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan