The admin's logged-in status is probably stored in the board's database. You can access the database from your own PHP script without modifying the board's code. You can use AJAX, as jackpf said, to poll the PHP script from the HTML page that contains the <iframe>. If the admin is logged out (or a certain amount of time has passed since the admin's last action), use Javascript to change the browser location or refresh the page.
Javascript to redirect to page2.php:
Code: Select all
window.location.href = './page2.php';
Also check the logged-in status each time the page with the <iframe> loads.
You can't really prevent anyone from accessing the board without modifying the board's code. Someone can just look at the <iframe>'s src attribute to find the real URL.
Another solution that would be immune to the <iframe> problems is to create a PHP script to act as a proxy for the board. All requests and responses would be filtered through the proxy script.
Edit: This post was recovered from search engine cache.