<?php
header('content-type:text/html;charset=utf-8');
$ch = curl_init();
$url = 'https://api.liangmlk.cn?ak=xxxx&appid=2124&areaname=xxxx';
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
$res = curl_exec($ch);
curl_close($ch);
return json_decode($res,true);
package main
import (
"http"
"net"
"ioutil"
)
func main(){
url := 'https://api.liangmlk.cn?ak=xxxx&appid=2124&areaname=xxxx'
req,_ := http.GET(url)
res := ioutil.ReadAll(req.Body)
fmt.Println(string(res))
}