开放API

文字识别

图片二值化

文字转语音

字符串加密

二维码

域名/IP归属

域名Whois

电话归属

免费使用API

发送邮件至:292951110@qq.com

标题:申请API

内容:www.com(拟使用的根域名)

一般24小时内回复邮件给予token,凭根域名及token在首页获取apikey

文字识别

请求地址:https://www.usualtool.com/api/ocr

请求参数:apikey,image [URL/urlencode(Base64)]

参数类型备注
imageurl地址/base64字符串该参数传入时可为URL地址,也可以使用base64图片编码,base64编码需进行urlencode编码传递。

返回结果:{"result": "识别字符串"}

function httppost($url,$data){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("UTAUTHDOMAIN:".$_SERVER["SERVER_NAME"]));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
$apikey="";
$image="";
echo httppost("https://www.usualtool.com/api/ocr","apikey={$apikey}&image={$image}");
function httppost(url,data)  
    set Http=CreateObject("MSXML2.XMLHTTP")
    Http.open "POST",url,false 
    Http.setRequestHeader "Content-Length",Len(data)   
    Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded;charset=utf-8" 
    Http.setRequestHeader "UTAUTHDOMAIN",Request.ServerVariables("SERVER_NAME")
    Http.send data 
        If Err.Number<>0 Then   
            Set Http=Nothing  
            httppost = "$False$"  
            Exit Function  
        End If  
    httppost=bytesToBSTR(Http.responseBody,"utf-8") 
    set http=nothing 
End Function
function BytesToBstr(body,Cset) 
    dim objstream 
    set objstream = Server.CreateObject("adodb.stream")
    objstream.Type = 1 
    objstream.Mode =3 
    objstream.Open 
    objstream.Write body 
    objstream.Position = 0 
    objstream.Type = 2 
    objstream.Charset = Cset 
    BytesToBstr = objstream.ReadText 
    objstream.Close 
    set objstream = nothing 
End function
dim apikey,image
apikey=""
image=""
response.write httppost("https://www.usualtool.com/api/ocr","apikey="&apikey&"&image="&image&"")

图片二值化

请求地址:https://www.usualtool.com/api/imgbin

请求参数:apikey,image [urlencode(Base64)]

参数类型备注
imagebase64字符串base64图片编码,base64编码需进行urlencode编码传递。

返回结果:{"result": "图片base64编码"}

function httppost($url,$data){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("UTAUTHDOMAIN:".$_SERVER["SERVER_NAME"]));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
$apikey="";
$image="";
echo httppost("https://www.usualtool.com/api/imgbin","apikey={$apikey}&image={$image}");
function httppost(url,data)  
    set Http=CreateObject("MSXML2.XMLHTTP")
    Http.open "POST",url,false 
    Http.setRequestHeader "Content-Length",Len(data)   
    Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded;charset=utf-8" 
    Http.setRequestHeader "UTAUTHDOMAIN",Request.ServerVariables("SERVER_NAME")
    Http.send data 
        If Err.Number<>0 Then   
            Set Http=Nothing  
            httppost = "$False$"  
            Exit Function  
        End If  
    httppost=bytesToBSTR(Http.responseBody,"utf-8") 
    set http=nothing 
End Function
function BytesToBstr(body,Cset) 
    dim objstream 
    set objstream = Server.CreateObject("adodb.stream")
    objstream.Type = 1 
    objstream.Mode =3 
    objstream.Open 
    objstream.Write body 
    objstream.Position = 0 
    objstream.Type = 2 
    objstream.Charset = Cset 
    BytesToBstr = objstream.ReadText 
    objstream.Close 
    set objstream = nothing 
End function
dim apikey,image
apikey=""
image=""
response.write httppost("https://www.usualtool.com/api/imgbin","apikey="&apikey&"&image="&image&"")

文字转语音

https://www.usualtool.com/api/yuyin

请求参数:apikey,sex [0/1],text [String]

参数类型备注
sex数值0为女生,1为男生
text文本5000字以内

返回结果:{"result": "语音地址"}

function httppost($url,$data){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("UTAUTHDOMAIN:".$_SERVER["SERVER_NAME"]));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
$apikey="";
$sex="";
$text="";
echo httppost("https://www.usualtool.com/api/yuyin","apikey={$apikey}&sex={$per}&text={$text}");
function httppost(url,data)  
    set Http=CreateObject("MSXML2.XMLHTTP")
    Http.open "POST",url,false 
    Http.setRequestHeader "Content-Length",Len(data)   
    Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded;charset=utf-8" 
    Http.setRequestHeader "UTAUTHDOMAIN",Request.ServerVariables("SERVER_NAME")
    Http.send data 
        If Err.Number<>0 Then   
            Set Http=Nothing  
            httppost = "$False$"  
            Exit Function  
        End If  
    httppost=bytesToBSTR(Http.responseBody,"utf-8") 
    set http=nothing 
End Function
function BytesToBstr(body,Cset) 
    dim objstream 
    set objstream = Server.CreateObject("adodb.stream")
    objstream.Type = 1 
    objstream.Mode =3 
    objstream.Open 
    objstream.Write body 
    objstream.Position = 0 
    objstream.Type = 2 
    objstream.Charset = Cset 
    BytesToBstr = objstream.ReadText 
    objstream.Close 
    set objstream = nothing 
End function
dim apikey,sex,text
apikey=""
sex=""
text=""
response.write httppost("https://www.usualtool.com/api/imgbin","apikey="&apikey&"&sex="&sex&"&text="&text&"")

字符串加密

请求地址:https://www.usualtool.com/api/encode

请求参数:apikey,text [String]

参数类型备注
text文本

返回结果:{ "result": { "md5": "MD5字符串", "base64": "Base64字符串", "sha1": "Sha1字符串", "hash": "哈希字符串" } }

function httppost($url,$data){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("UTAUTHDOMAIN:".$_SERVER["SERVER_NAME"]));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
$apikey="";
$text="";
echo httppost("https://www.usualtool.com/api/encode","apikey={$apikey}&text={$text}");
function httppost(url,data)  
    set Http=CreateObject("MSXML2.XMLHTTP")
    Http.open "POST",url,false 
    Http.setRequestHeader "Content-Length",Len(data)   
    Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded;charset=utf-8" 
    Http.setRequestHeader "UTAUTHDOMAIN",Request.ServerVariables("SERVER_NAME")
    Http.send data 
        If Err.Number<>0 Then   
            Set Http=Nothing  
            httppost = "$False$"  
            Exit Function  
        End If  
    httppost=bytesToBSTR(Http.responseBody,"utf-8") 
    set http=nothing 
End Function
function BytesToBstr(body,Cset) 
    dim objstream 
    set objstream = Server.CreateObject("adodb.stream")
    objstream.Type = 1 
    objstream.Mode =3 
    objstream.Open 
    objstream.Write body 
    objstream.Position = 0 
    objstream.Type = 2 
    objstream.Charset = Cset 
    BytesToBstr = objstream.ReadText 
    objstream.Close 
    set objstream = nothing 
End function
dim apikey,text
apikey=""
text=""
response.write httppost("https://www.usualtool.com/api/encode","apikey="&apikey&"&text="&text&"")

二维码

请求地址:https://www.usualtool.com/api/qrcode

请求参数:apikey,size [Number],text [String]

参数类型备注
size数值1-10
text文本文本内容或URL地址

返回结果:{ "result": "二维码base64编码" }

function httppost($url,$data){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("UTAUTHDOMAIN:".$_SERVER["SERVER_NAME"]));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
$apikey="";
$size="";
$text="";
echo httppost("https://www.usualtool.com/api/qrcode","apikey={$apikey}&size={$size}&text={$text}");
function httppost(url,data)  
    set Http=CreateObject("MSXML2.XMLHTTP")
    Http.open "POST",url,false 
    Http.setRequestHeader "Content-Length",Len(data)   
    Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded;charset=utf-8" 
    Http.setRequestHeader "UTAUTHDOMAIN",Request.ServerVariables("SERVER_NAME")
    Http.send data 
        If Err.Number<>0 Then   
            Set Http=Nothing  
            httppost = "$False$"  
            Exit Function  
        End If  
    httppost=bytesToBSTR(Http.responseBody,"utf-8") 
    set http=nothing 
End Function
function BytesToBstr(body,Cset) 
    dim objstream 
    set objstream = Server.CreateObject("adodb.stream")
    objstream.Type = 1 
    objstream.Mode =3 
    objstream.Open 
    objstream.Write body 
    objstream.Position = 0 
    objstream.Type = 2 
    objstream.Charset = Cset 
    BytesToBstr = objstream.ReadText 
    objstream.Close 
    set objstream = nothing 
End function
dim apikey,size,text
apikey=""
size=""
text=""
response.write httppost("https://www.usualtool.com/api/qrcode","apikey="&apikey&"&size="&size&"&text="&text&"")

域名/IP归属

请求地址:https://www.usualtool.com/api/domain

请求参数:apikey,domain [Url]

参数类型备注
domain文本IP或域名

返回结果:{ "result": { "add": "物理位置", "isp": "运营商" } }

function httppost($url,$data){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("UTAUTHDOMAIN:".$_SERVER["SERVER_NAME"]));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
$apikey="";
$domain="";
echo httppost("https://www.usualtool.com/api/domain","apikey={$apikey}&domain={$domain}");
function httppost(url,data)  
    set Http=CreateObject("MSXML2.XMLHTTP")
    Http.open "POST",url,false 
    Http.setRequestHeader "Content-Length",Len(data)   
    Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded;charset=utf-8" 
    Http.setRequestHeader "UTAUTHDOMAIN",Request.ServerVariables("SERVER_NAME")
    Http.send data 
        If Err.Number<>0 Then   
            Set Http=Nothing  
            httppost = "$False$"  
            Exit Function  
        End If  
    httppost=bytesToBSTR(Http.responseBody,"utf-8") 
    set http=nothing 
End Function
function BytesToBstr(body,Cset) 
    dim objstream 
    set objstream = Server.CreateObject("adodb.stream")
    objstream.Type = 1 
    objstream.Mode =3 
    objstream.Open 
    objstream.Write body 
    objstream.Position = 0 
    objstream.Type = 2 
    objstream.Charset = Cset 
    BytesToBstr = objstream.ReadText 
    objstream.Close 
    set objstream = nothing 
End function
dim apikey,domain
apikey=""
domain=""
response.write httppost("https://www.usualtool.com/api/domain","apikey="&apikey&"&domain="&domain&"")

域名Whois

请求地址:https://www.usualtool.com/api/whois

请求参数:apikey,domain [Url]

参数类型备注
domain文本域名

返回结果:{ "result": "域名whois信息" }

function httppost($url,$data){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("UTAUTHDOMAIN:".$_SERVER["SERVER_NAME"]));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
$apikey="";
$domain="";
echo httppost("https://www.usualtool.com/api/whois","apikey={$apikey}&domain={$domain}");
function httppost(url,data)  
    set Http=CreateObject("MSXML2.XMLHTTP")
    Http.open "POST",url,false 
    Http.setRequestHeader "Content-Length",Len(data)   
    Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded;charset=utf-8" 
    Http.setRequestHeader "UTAUTHDOMAIN",Request.ServerVariables("SERVER_NAME")
    Http.send data 
        If Err.Number<>0 Then   
            Set Http=Nothing  
            httppost = "$False$"  
            Exit Function  
        End If  
    httppost=bytesToBSTR(Http.responseBody,"utf-8") 
    set http=nothing 
End Function
function BytesToBstr(body,Cset) 
    dim objstream 
    set objstream = Server.CreateObject("adodb.stream")
    objstream.Type = 1 
    objstream.Mode =3 
    objstream.Open 
    objstream.Write body 
    objstream.Position = 0 
    objstream.Type = 2 
    objstream.Charset = Cset 
    BytesToBstr = objstream.ReadText 
    objstream.Close 
    set objstream = nothing 
End function
dim apikey,domain
apikey=""
domain=""
response.write httppost("https://www.usualtool.com/api/whois","apikey="&apikey&"&domain="&domain&"")

电话归属

请求地址:https://www.usualtool.com/api/tel

请求参数:apikey,telphone [Number]

参数类型备注
telphone数值固定电话或移动号码(也可以取号码前7位)

返回结果:{ "result": { "add": "地址", "isp": "运营商", "areacode": "区号", "postcode": "邮编" } }

function httppost($url,$data){
    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, $url);
    curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
    curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);
    curl_setopt($curl, CURLOPT_POST, 1);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);
    curl_setopt($curl, CURLOPT_HTTPHEADER, array("UTAUTHDOMAIN:".$_SERVER["SERVER_NAME"]));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}
$apikey="";
$telphone="";
echo httppost("https://www.usualtool.com/api/tel","apikey={$apikey}&telphone={$telphone}");
function httppost(url,data)  
    set Http=CreateObject("MSXML2.XMLHTTP")
    Http.open "POST",url,false 
    Http.setRequestHeader "Content-Length",Len(data)   
    Http.setRequestHeader "CONTENT-TYPE", "application/x-www-form-urlencoded;charset=utf-8" 
    Http.setRequestHeader "UTAUTHDOMAIN",Request.ServerVariables("SERVER_NAME")
    Http.send data 
        If Err.Number<>0 Then   
            Set Http=Nothing  
            httppost = "$False$"  
            Exit Function  
        End If  
    httppost=bytesToBSTR(Http.responseBody,"utf-8") 
    set http=nothing 
End Function
function BytesToBstr(body,Cset) 
    dim objstream 
    set objstream = Server.CreateObject("adodb.stream")
    objstream.Type = 1 
    objstream.Mode =3 
    objstream.Open 
    objstream.Write body 
    objstream.Position = 0 
    objstream.Type = 2 
    objstream.Charset = Cset 
    BytesToBstr = objstream.ReadText 
    objstream.Close 
    set objstream = nothing 
End function
dim apikey,telphone
apikey=""
telphone=""
response.write httppost("https://www.usualtool.com/api/tel","apikey="&apikey&"&telphone="&telphone&"")