I am able to send the CURL request to a test http API and getting the response as well.
My CURL request is like:
$request = "";
$param['auth-userid'] = '449735';
$param['api-key'] = 'apikey';
$param['domain-name'] ='sambalpurodisha';
$param['tlds']='com';
foreach ($param as $key => $val) {$request.= $key ."=".urlencode($val);
$request .="&";}
$request=substr($request,0,strlen($request)- 1 );
$url = "https://test.httpapi.com/api/domains/available.json?".$request;
$ch = curl_init($url);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
$result = curl_exec( $ch );
curl_close( $ch );
I am getting a response like:
{"sambalpurodisha.com":{"status":"available","classkey":"domcno"}}
Now I have tried everything to format the result in more readable manner like Domain - sambalpurodisha.com is available for purchase.
I have tried number of suggestions here at stack, but none worked for me. A direction where I can look for