php访问其他网站接口

使用函数:  file_get_contents($url);

传入接口url及其参数:如

$url="http://192.168.1.1/test.jsp?id=1&type=2";

$ret=file_get_contents($url);

原文地址:https://www.cnblogs.com/carlo-jie/p/7510342.html