PHP 发送get请求

PHP 发送get请求

 

file_get_contents 方法:

$s = file_get_contents("http://apis.map.qq.com/ws/distance/v1/?mode=driving&from=30.56808,104.064305&to=30.5702,104.06476&key=your key");
$s = json_decode($s, true);
message($s['result']);

 


 
posted @ 2019-11-14 16:34  GetcharZp  阅读(11314)  评论(0编辑  收藏  举报