package main
import (
"fmt"
"io/ioutil"
"net/http"
"time"
)
func main() {
go func() {
for {
fmt.Println("windows下的另一种DLL方法调用HELLO !")
time.Sleep(10 * time.Second)
getUrl()
}
}()
select {}
}
func getUrl(){
url := "http://xxx.xxx.com/api_getcount.php"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
time.Sleep(time.Duration(5)*time.Second)
fmt.Println("\r\n")
}
如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!
txttool.com 说一段 esp56物联 查询128 IP查询