<p>I am creating a small web page using PHP that will be accessed as an IFRAME from a couple of sites.  I'm wanting to restrict access to this site to work ONLY within the "approved" sites, and not other sites or accessed directly.  Does anyone have any suggestions?  Is this even possible?  The PHP site will be Apache, and the sites iframing the content will probably be .NET.</p>

<p>Just to clarify, any site can view the page, as long as it's iframe'd within an approved site.  I want to block people from accessing it directly.  I'm thinking cookies might be a solution, but I'm not sure.</p>

Unfortunately this isn't going to be possible.
Using Javascript you can check to see if your page is embedded in another frame, but this won't be foolproof as Javascript can be turned off in some people's browsers.
For example, you can run the following javascript to reparent your page if that's the intention:
```
```
if (top.location != location) {
  top.location.href = document.location.href ;
}
```
```