要领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怎样轮回要求接口的细致内容,更多请关注ki4网别的相干文章!