mardi 22 mai 2018

Need to pass the domain name and tld variable in the form reseller club API calls

Need to pass the Domain name and tld value in the form using reseller domain availability checking API. I got an error as follows "file_get_contents(https://domaincheck.httpapi.com/api/domains/available.json?auth-userid=711757&domain-name=&tlds=&api-key=74miSZPgYkkc108Ptmeo5Q8iDTtKk3xi): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error"

My Controller Code

   public function domaincheck(Request $request)
     {
        $domainname = $request['domainname'];
        $tlds = $request['tlds'];
        $response = file_get_contents('https://domaincheck.httpapi.com/api/domains/available.json?auth-userid=711757&domain-name='.$domainname.'&tlds='.$tlds.'&api-key=74miSZPgYkkc108Ptmeo5Q8iDTtKk3xi');  
        $final_data = json_decode($response,true);// Use true to get data in array rather than object
        // dd($final_data);
        return view('clientlayout.main.test',compact('final_data'));
     }

My Form View Code

<form class="form-horizontal" method="get"> 
     <div class="form-group">
       <div class=" col-lg-2"></div>
         <div class="col-lg-8">
          <div class="input-group m-b">
            <span class="input-group-addon" style="padding-left:10px; background-color: #999;" class='unclickable'>www</span>
            <input type="text" name="domainname" class="form-control">
            <span class="input-group-addon">
            <select class="form-control" name="tld" style="width: 100px;">
            <option value="com">com</option>
            </select>  
            </span>
            <span class="input-group-addon">
            <button type="submit" class="btn btn-sm btn-success" >Submit</button>  
            </span>
      </div>
  </div>
</div>

Please suggest any solutions



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2keOS2H
via IFTTT

Aucun commentaire:

Enregistrer un commentaire