Is it possible to detect the PHP file request
<p>For example we have this URL:
<a href="https://www.domain.com/pdf.php?url=http://www.domain.com/report.php?id=341" rel="nofollow">https://www.domain.com/pdf.php?url=http://www.domain.com/report.php?id=341</a></p>

<p>I would like to know if it's possible to somehow detect using PHP in <code>report.php</code> that <code>pdf.php</code> is trying to open access <code>report.php?id=341</code>.</p>

<p>If that's possible I would limit later on that report.php can be called only by pdf.php, invoice.php etc.</p>

<p>BASICALY I want to make sure that report.php is requested by server and not human.</p>

<p>Is there perhaps a security risk?</p>

<p>I hope my question make sense. Thanks in advance.</p>
