亚洲精品国产中文字幕在线,国偷自产一区二区三区蜜臀,精品久久久国产一区二区色婷婷,成人片免费视频在线观看

點(diǎn)擊這里給我發(fā)消息
幫助中心

工作時間:8:30 - 17:30

GO

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 := "帳號"
    _password := "接口密碼"
    _mobile := "158xxxxxxxx"
    _content := "您的訂單編碼:4557。如需幫助請聯(lián)系客服。"
    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://sms.106jiekou.com/utf8/sms.aspx", 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()     //一定要關(guān)閉resp.Body
    data, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(data), err)
}