从enom api获取tld和域名时,我得到的错误是“不支持的操作数”,特别是“co.in”,“in.net”等特定tld。建议我解决这个问题的解决方案。
在下面查找我的控制器代码
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=resellpw&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);
}
刀片代码如下:
<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>
我的路线如下:
Route::get('/registerdomain','EnomController@domaincheck');