how to get the url of the requesting page
Moderator: General Moderators
how to get the url of the requesting page
I am trying to build in some security measures and I would like to make sure that the url that the page is being requested from is on a list of valid URL's. The question I have is how do I read in the URL of the page that has requested my PHP script. I know how to get the query string, is it similar?
hmm. Thank you for the response.
Maybe there is another way around this. The whole point of this is that I have a widget that I would like other people to place into their site, however I want to ensure that only those registered are allowed to put the widget on their site (which is why I wanted to verify the requesting page).
Currently this is done by copying and pasting a <script> that calls my PHP code. would it be possible to include something within the <script> that would pass in the URL of the requesting page as a query string?
Come to think of it, there would be nothing preventing someone from simply hard coding the url into the query string essentially making the whole thing pointless. Any thoughts?
Maybe there is another way around this. The whole point of this is that I have a widget that I would like other people to place into their site, however I want to ensure that only those registered are allowed to put the widget on their site (which is why I wanted to verify the requesting page).
Currently this is done by copying and pasting a <script> that calls my PHP code. would it be possible to include something within the <script> that would pass in the URL of the requesting page as a query string?
Come to think of it, there would be nothing preventing someone from simply hard coding the url into the query string essentially making the whole thing pointless. Any thoughts?