View Full Version : IFrames Related Question

02-06-2009, 07:54 AM
I have a problem I have been tackling for awhile and I'm not sure how to go about solving it.

The problem is I'm using an iframe because in order to access it you have to login through a php secure system to get to the forums. Due to spam issues we decided to change it over like this as the login runs through a spam database check before allowing access.

The problem is and remains to be that you can access the forums through the iframe or you can access it by going to the main forum link obviously.

My question is what type of coding could I use that I could stick in the index.php page of the forums so basically if you go their it looks at the address bar URL and if its not that of the iframe it automatically redirects you to the iframe and when it checks it again the iframe URL never changes therefore allowing you access to everything on the screen.

I assume this is possible and looking for some responses.


02-06-2009, 10:09 AM
You can check the URL of the top page and if it isn't the iframe, redirect to the iframe page. But if this is done with javascript (the forum you've posted in), all a would be spammer would have to do is turn off javascript. In fact many spam robots surf without javascript enabled to begin with.

If you have PHP, as I think you are saying that you do, look here for an idea:


02-06-2009, 08:16 PM
Thanks jscheuer1

However I got stuck and reposted it with an alternate question in the PHP forums, but thanks for getting me started!