您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

php怎么循环请求接口

2024/3/26 18:03:53发布13次查看
方法1: 
用file_get_contents 以get方式获取内容
[php] view plaincopyprint?<?php$url='http://www.domain.com/';$html = file_get_contents($url);echo $html;?>
方法2:
用fopen打开url, 以get方式获取内容
[php] view plaincopyprint?<?php$fp = fopen($url, 'r');//返回请求流信息(数组:请求状态,阻塞,返回值是否为空,返回值http头等)[php] view plaincopyprint?stream_get_meta_data($fp);[php] view plaincopyprint?while(!feof($fp)) {
推荐教程:
php开发app接口视频教程
以上就是php怎么循环请求接口的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product