mardi 29 mai 2018

I'm facing the issue mentioned below while displaying the price list for the domains suggested

While getting tld's and domain name from enom api I'm getting error as "Unsupported Operand" for particular tld's like "co.in","in.net". Suggest me a solution to solve this.

Find below my controller code

   public function domaincheck(Request $request)
  {
        $sld = $request['sld'];
        $tld = $request['tld'];
        $response = file_get_contents('https://reseller.enom.com/interface.asp?command=check&sld='. $sld .'&tld='. $tld .'&uid=decksys&pw=Amy.th3ist4917&responsetype=xml');  
        $data = simplexml_load_string($response);
        $configdata   = json_encode($data);
        $final_data = json_decode($configdata,true);// Use true to get data in array rather than object
        // dd($final_data);
 }

The blade code is given below:

     <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="sld" class="form-control" required>
  <span class="input-group-addon">

  <select class="form-control" name="tld" style="width: 100px;">
  <option value="com">com</option>
  <option value="in">in</option>
  <option value="info">info</option>
  <option value="org">org</option>
  <option value="co.in">co.in</option>
  <option value="in.net">in.net</option>
  <option value="net">net</option>
  <option value="biz">biz</option>
      </select>  
      </span>
      <span class="input-group-addon">
      <button type="submit" class="btn btn-sm btn-success" >Submit</button>  
      </span>

My route is given below:

Route::get('/registerdomain','EnomController@domaincheck');



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

Aucun commentaire:

Enregistrer un commentaire