Get url from the site that made the ajax request in php

0

I would like to know if I have the url of the site that does the ajax request for a file from another server.

Ex:

I send a form through www.exemplo1.com to www.exemplo2.com/submit.php and in submit.php I want to get the url of www.exemplo1.com .

How to do this?

    
asked by anonymous 23.09.2017 / 04:03

1 answer

0

To get the URL of the page that made an HTTP request in PHP, use:

$_SERVER["HTTP_REFERER"]
    
23.09.2017 / 04:10