Thanks so much both you guys. gdnovey for asking and Kafkaesqui for knowing an answer. I had a need for a simple site. It has a little web application. It's free but it's important to me that people sign up. Using this information, if somebody is registered and signed up, then I can make the content of a certain page appear.
If they're not logged in, an alternate 'sorry' message displays, and requests them to register and log in.
This bit of trickery uses the 'Inline PHP' plugin, so that I can do the trick on only one page, by typing (as html) the following code onto the page. (*The 'Inline PHP* plugin uses '<exec>' opening and closing tags instead of the usual php open and close tags.)
<exec>
global $user_ID;
if( $user_ID ) {
echo "<iframe src=\"http://somedomain.com/somepage.php\" name=\"somename\" width=\"520\" height=\"520\">You shouldn't be reading this unless something is dreadfully amiss.</iframe> ";
}
else {
echo "Oops! You must be logged in to view this page!
If you have an account please log in on the 'Login' page.
If you don't have a free account yet, please <b>register</b> on the Login page.
You will be sent a confirmation email, and then when you log in,
The webapp will appear right here on this page. Thank you!
";
};
</exec>
I apologize that the iframe line is so long. I got some garbage when I tried formatting my code prettier. Running in one long line is what seems to work the best.
When a logged-in viewer views this page, the inline frame is open and through it the visitor sees the web-application, which is actually stored elsewhere as it requires more code than fits nicely on a wordpress page.
Now I need to find a way to prevent anybody from just reading the page source where the true location is openly stated, and just going to the page where the application really sits. I bet there's a way; probably it will show up soon.