I tested the sample php code of enom api in my localhost and it functions properly. However, when I tested it in my web server, it fails. This sample code checks domain availability using enom API. Any idea why this happens is much appreciated. Thanks. I'm new in using enom API.
// URL for API request $url = 'https://resellertest.enom.com/interface.asp?command=check&sld=enom&tld=com&responsetype=xml&uid=resellid&pw=resellpw'; // Load the API results into a SimpleXML object $xml = simplexml_load_file($url); // Read the results $rrpCode = $xml->RRPCode; $rrpText = $xml->RRPText; // Perform actions based on results switch ($rrpCode) { case 210: echo "Domain available"; break; case 211: echo "Domain not available"; break; default: echo $rrpCode . ' ' . $rrpText; break; }
Error:
Warning: simplexml_load_file(): SSL operation failed with code 1. OpenSSL Error messages: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure in /home/webdesigndavao/public_html/checkdomain.php on line 26 Warning: simplexml_load_file(): Failed to enable crypto in /home/webdesigndavao/public_html/checkdomain.php on line 26 Warning: simplexml_load_file(https://resellertest.enom.com/interface.asp?command=check&sld=enom&tld=com&responsetype=xml&uid=youruid&pw=passwordhere): failed to open stream: operation failed in /home/webdesigndavao/public_html/checkdomain.php on line 26 Warning: simplexml_load_file(): I/O warning : failed to load external entity "https://resellertest.enom.com/interface.asp?command=check&sld=enom&tld=com&responsetype=xml&uid=youruid&pw=passwordhere" in /home/webdesigndavao/public_html/checkdomain.php on line 26 bool(false)