Reputation: 4611
I have a php page http://mydomain.com/mypage.php this page will be accessible by public and our partner. my partner is supposed to send a POST request over port 7333 to http://mydomain.com:7333/mypage.php . now how can i accept the parameters if and only if they came over port 7333. i want to distinguish between parameters that are coming from our partner from params sent by a hacker
Thank you
Upvotes: 0
Views: 81
Reputation: 449515
You will have to set up your web server to listen on that port.
See Running different sites on different ports in the Apache manual
This is not possible without system administrator privileges.
Also, it's not good to use a non-standard port for security, at least not if it's the only protection. You should implement some sort of authentication instead!
Upvotes: 1
Reputation: 45578
Couldn't you let the partner send something like data=[...]&secret=gfhshjkfbdnfgezur
to the normal port instead? This string would be the same every time and you would check whether it's the correct one.
Upvotes: 1