For exmaple, I have a page, secure.php, this page will only accept the access from the machine that has the domain such as "securedfriend.com".
Two approaches will be used.
1) I will detect the if the incoming traffic is from securedfriend.com, how to do that?
if (substr(trim(gethostbyaddr($_SERVER['REMOTE_ADDR']), -17)=="securedfriend.com")
{
echo ("Welcome Friend!");
....
}
else
{
echo("bye bye");
}
Is this code right?
2) Also this 3rd party site says they can also issue a certificate to us in advance and when it will communicate with the secure.php on my site, it will also send the certificate with it, I can check the certificate value to see if it matches. How does this "client certificate" approaches going to work? or there is no industry standard approach of client certificate approach, this is just their own custom approach, just give me a string with encrypted values, and then later on i will just match the values to see if it is matched the value they send to me before. (I am not their customer yet and cannot get detail tech support yet, this client certificate approach is from their online doc but without further details.)