PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
There are a host of things that need to be set up to allow this sort of activity. None of them are preferred as this type of process is noticeably insecure.
There are a host of things that need to be set up to allow this sort of activity. None of them are preferred as this type of process is noticeably insecure.
That's true but I guess that's not a problem.
Now here are my two new questions:
1- What else should be set other than allow_url_fopen option in php.ini?
I don't have access to php.ini of a server, so I can't find the answer to my second question by myself.
2- I wanna make sure only http://www.server2.com/page2.php has access to the contents of $MyArray, so before I fill the array, I should check the identity of the referring entity. How can I know who is reffering to page1.php? Is there a function that returns the reffering page or something else that works here?
You could try using $_SERVER['HTTP_REFERER'], however, not all systems return a referer header. This is totally unreliable and should not be used. That being said, there is no real way of knowing the authentic identity of the referring party without having some form of authenticated handshake between the two.