The php page specifies the source page execution?

as the title: there is a js button in the a.php page that triggers the execution of b.php
Q: how to write code in b.php to prevent browsing that is not triggered by the js button in a.php? (without session)

Mar.10,2021

encrypt a regular random parameter from a to b, and decrypt it on b, as long as the decryption key is not made public.

  

check the variable $_ SERVER ['HTTP_REFERER'], but this is not so reliable because it comes from the browser, is easily tampered with (or not sent), and is more reliable than session.

Menu