亚洲 激情 ,欧美精品,亚洲18色成人网站www,色综合天天综合高清网国产在线,婷婷六月综合缴情在线,无码一区二区三区视频

您是否正受到短信簽名報(bào)備的困擾?互億無線解決方案讓您最快15分鐘內(nèi)恢復(fù)信息傳遞,馬上 注冊體驗(yàn)。

互億無線 · 文檔中心

手機(jī)號碼歸屬地查詢 - 代碼示例


go對接手機(jī)號碼歸屬地查詢接口DEMO示例
本文為您提供了go語言版本的IP地址查詢對接DEMO示例

手機(jī)號碼歸屬地查詢接口文檔 點(diǎn)擊下載

手機(jī)號碼歸屬地查詢接入指南 點(diǎn)擊訪問


// 接口類型:互億無線手機(jī)號歸屬地查詢接口
// 賬戶注冊:https://user.ihuyi.com/register.html
// 注意事項(xiàng):
// DEMO僅作參考

package main

import (
	"crypto/md5"
	"encoding/hex"
	"fmt"
	"io/ioutil"
	"net/http"
	"net/url"
	"strconv"
	"strings"
	"time"
)

func GetMd5String(s string) string {
	h := md5.New()
	h.Write([]byte(s))
	return hex.EncodeToString(h.Sum(nil))
}
func main() {
	v := url.Values{}
	_now := strconv.FormatInt(time.Now().Unix(), 10)
	//fmt.Printf(_now)
	_account := "APIID"
	_password := "APIKEY"
	_mobile := "136xxxxxxxx"
	v.Set("account", _account)
	v.Set("password", GetMd5String(_account+_password+_now))
	v.Set("mobile", _mobile)
	v.Set("time", _now)
	//body := ioutil.NopCloser(strings.NewReader(v.Encode())) //把form數(shù)據(jù)編下碼
	body := strings.NewReader(v.Encode()) //把form數(shù)據(jù)編下碼
	client := &http.Client{}
	req, _ := http.NewRequest("POST", "https://api.ihuyi.com/appdev/mobile/Submit.json", body)

	req.Header.Set("Content-Type", "application/x-www-form-urlencoded;")
	//fmt.Printf("%+v
", req) //看下發(fā)送的結(jié)構(gòu)

	resp, err := client.Do(req) //發(fā)送
	defer resp.Body.Close()     //一定要關(guān)閉resp.Body
	data, _ := ioutil.ReadAll(resp.Body)
	fmt.Println(string(data), err)
}

現(xiàn)在注冊,即享新用戶禮包!

在線咨詢
電話咨詢

服務(wù)熱線:

4008 808 898

服務(wù)熱線(工作時(shí)間):

4008 808 898

業(yè)務(wù)咨詢(非工作時(shí)間):

售后咨詢(非工作時(shí)間):

驗(yàn)證碼已發(fā)送到您的手機(jī),請查收!

輸入驗(yàn)證碼后,點(diǎn)擊“開通體驗(yàn)賬戶”按鈕可立即開通體驗(yàn)賬戶。

收不到短信驗(yàn)證碼?
互億無線不提供接碼服務(wù),接碼用戶請勿點(diǎn)擊開通按鈕。
×