🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
# http\_post() ## http\_post() ``` <pre class="calibre11">``` http_post($url, $post = '', $cookie='', $timeout = 10, $times = 3) ``` ``` #### 【功能】 通过一个 HTTP POST 请求获取内容。 #### 【参数】 ``` <pre class="calibre11">``` $url:完整的网址 $post: POST 内容,格式:username=Jack&password=123465 $cookie: COOKIE 数据,格式:username=Jack&password=123456 $timeout:超时时间,单位为秒 $times:重试次数 ``` ``` #### 【用例】 ``` <pre class="calibre11">``` <?php include './xiunophp/xiunophp.php'; echo http_postt("http://bbs.xiuno.com/user-login.htm", "username=admin&password=123456"); /* 结果: WEB 服务器返回的信息 */ ?> ``` ```