http_post()

http_post()

http_post($url, $post = "", $cookie="", $timeout = 10, $times = 3)

【功能】

通过一个 HTTP POST 请求获取内容。

【参数】

$url:完整的网址
$post: POST 内容,格式:username=Jack&password=123465
$cookie: COOKIE 数据,格式:username=Jack&password=123456
$timeout:超时时间,单位为秒
$times:重试次数

【用例】

<?php

include "./xiunophp/xiunophp.php";

echo http_postt("http://bbs.xiuno.com/user-login.htm", "username=admin&password=123456");

/*  结果:

WEB 服务器返回的信息

*/

?>
文章导航