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']);

 

 
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM