日韩亚洲欧美一区二区三区,日本免费暖暖在线小视频,翘臀美女131,国产午夜av一在线观看

GO

GO代碼示例

//接口類型:達信通國際短信接口。
//賬戶注冊:請通過該地址開通賬戶http://sms.wx96.com/register.html
//注意事項:
//(1)調(diào)試期間,請仔細閱讀接口文檔;
//(2)請使用 用戶名(例如:cf_demo123)及 APIkey來調(diào)用接口,APIkey在會員中心可以獲??;
//(3)該代碼僅供接入達信通短信接口參考使用,客戶可根據(jù)實際需要自行編寫;
 
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 := "cf_xxxxxxx" //用戶名是登錄wx96.com賬號名(例如:cf_demo123)
    _password := "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx" //查看密碼請登錄用戶中心->國際短信>帳戶參數(shù)設置->APIKEY
    _mobile := "136xxxxxxxx"
    _content := "Your verification code is 1125"
    v.Set("account", _account)
    v.Set("password", GetMd5String(_account+_password+_mobile+_content+_now))
    v.Set("mobile", _mobile)
    v.Set("content", _content)
    v.Set("time", _now)
    body := ioutil.NopCloser(strings.NewReader(v.Encode())) //把form數(shù)據(jù)編下碼
    client := &http.Client{}
    req, _ := http.NewRequest("POST", "http://api.isms.wx96.com/webservice/isms.php?method=Submit&format=json", body)
 
    req.Header.Set("Content-Type", "application/x-www-form-urlencoded; param=value")
    //fmt.Printf("%+v\n", req) //看下發(fā)送的結(jié)構(gòu)
 
    resp, err := client.Do(req) //發(fā)送
    defer resp.Body.Close()     //一定要關閉resp.Body
    data, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(data), err)
}



在線咨詢
電話咨詢

服務熱線:

4008 808 898

服務熱線(工作時間):

4008 808 898

業(yè)務咨詢(非工作時間):

4008 808 898

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

4008 808 898

蓝山县| 鹿泉市| 明水县| 巴青县| 阿拉善盟| 迁安市| 洛南县| 永平县| 白河县| 左贡县| 叙永县| 垣曲县| 元阳县| 三明市| 运城市| 保靖县| 长子县| 定安县| 尼勒克县| 保康县| 黑水县| 南投县| 修武县| 遂溪县| 富蕴县| 岳阳市| 小金县| 惠东县| 东兰县| 平塘县| 江达县| 阿瓦提县| 九台市| 疏附县| 怀集县| 南京市| 米脂县| 即墨市| 游戏| 防城港市| 汪清县|