Please see my comment to the question. I cannot be sure I understand what you want correctly; and I cannot be even sure that you understand it. However, if I can make an assumption that you need some functionality only of the request to a PHP page is sent from a certain page on your site, your script can check up the
referer of the HTTP request and do some job only if the referer corresponds to some expected URL; in other cases, it should show something else, redirect to other page, etc.
Please see 'HTTP_REFERER' here:
http://php.net/manual/en/reserved.variables.server.php[
^].
—SA