PHP - How to determine if request is coming from a specific file.
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-02-21T05:14:53Z
Indexed on
2010/04/15
3:03 UTC
Read the original article
Hit count: 187
I have fileA.php on SERVER_A and fileB.php on SERVER_B
fileB.php makes a curl request to fileA.php for it's contents
How can fileA.php determine that the request is coming specifically from fileB.php?
--
I was thinking about sending the $_SERVER['SCRIPT_NAME'] in fileB.php to fileA.php but since someone can go into fileB.php or any file in general and just do $_SERVER['SCRIPT_NAME'] = 'fileB.php'; it's not really that secure.
So how can I determine, for security reasons, that the request is coming from a specific file on a different server?
© Stack Overflow or respective owner