-1
它可能创建一个php代码来登录使用后和存储cookie? 然后使用cookies做另一个帖子?登录然后POST
如果可能的话我想没有表现出任何一个PHP代码,也许后回声1 OK后回声2 OK
我发现这个代码,但它不工作
<?php
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, 'http://xxxxxxxx/login.php');
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'username=xxxxxxx&password=xxxxxxxxx&submit=Login');
Curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
$store = Curl_exec ($ch);
curl_setopt ($ch. CURLOPT_URL, 'http://xxxxxx/postlink2.php');
curl_setopt ($ch, CURLOPT_POSTFIELDS, 'info1=xxxxxxx&info2=xxxxxx&info3=xxxxxxxxxx');
$content = curl_exec ($ch);
curl_close ($ch);
?>
我刚测试这个脚本,但第二个请求dnt的工作。 – Gorfi 2012-03-17 00:28:48