Forum Moderators: open
I haven't tried this, but I think it would be possible to make your frame src a dynamic file, then pre-parse the html file before displaying it.
So your frame src="stripFrameKiller.php?src=anotherdomain"
Then the stripFrameKiller.php would contain:
open src
find "top.location.href="
strip the entire line
echo the page
Please let me know what you think.
But I need to put it in some kind of frame
That will, in most cases, violate the copyright of the other page. If, for example, you were to link to my site, and have it open up within your frameset, you are "stealing" my page content. To the user it appears as if you are the owner of the other site as well... Keeping an external site within your frameset without explicit permission is no different than putting someone else's image on your site without permission.
Just something to think about.
Disclaimer: The above is not to be considered legal advise, but is merely a friendly pointer to spark a thought you may otherwise have missed. To find out the exact applicable laws and ensure that you are protected, please seek legal advise from an attorney near you.