[php]代码库
<? php
$url = "http://www.test.com/zzzz.php";
$post_data = array (
"foo" =< "bar",
"query" =< "Nettuts",
"action" =< "Submit"
);
$cookie_jar_index = 'f:/js/test/cookie.txt';
$cookie = "a=b;c=d;name=方世玉";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
// 我们在POST数据哦!
curl_setopt($ch, CURLOPT_POST, 1);
// 把post的变量加上
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_COOKIE, $cookie);
$output = curl_exec($ch);
curl_close($ch);
echo $output;