Hi, I have a form that is sending the data to another server, e.g.
http://www.server1.com/sender.php will POST the data from the form located in that server to http://www.serverremote.com/receiver.php
How can I know in receiver.php the name of the server that sent the POST? I would expect to get something like http://www.server1.com
Is that possible? Is there another way that I can send data from one server to another? I want to build a service in which users will need to create an account on my local server, and put some sort of API in their own website, of course they'll have to pay for it so I would like to provide them with a KEY and then they'll send that to me, but I want to make sure that they are sending it from the specific host that they paid for...
Thanks!
How to get sender server name from PHP
Moderator: General Moderators
Re: How to get sender server name from PHP
The PHP environment variable $_SERVER['HTTP_REFERER'] will normally give you the referring URL, but there are some limitations. See http://www.php.net/manual/en/reserved.v ... server.php.
Re: How to get sender server name from PHP
califdon wrote:The PHP environment variable $_SERVER['HTTP_REFERER'] will normally give you the referring URL, but there are some limitations. See http://www.php.net/manual/en/reserved.v ... server.php.
Thanks, but I would like it to be trust worthy, this seems like a very unsecured method.
Re: How to get sender server name from PHP
There's nothing trustworthy out there. Not with that method.