×

HTML、PHP、JS

php发送get、post请求的6种方法简明总结

Kalet Kalet 发表于2019-08-05 浏览199 评论0
 这篇文章主要介绍php发送get、post请求的6种方法简明总结,分别为使用file_get_contents、fopen、fsockopen、curl来发送GET和POST请求,需要的朋友可以参考下方法1:用file_get_contents以get方式获取内容:<?php$url='http://www.51growup.com/';$html=file_get_contents($url);echo$html;?>方法2:用fopen打开url,以get方式获取内容:<?php$fp=fopen($url,'r&...