作者hamilton618 (kobe)
看板PHP
标题[请益] 请问各位大大 CURL模拟登入无名问题><
时间Tue Nov 2 01:16:45 2010
请问各位PHP高手大大,小弟用PHP模拟登入无名,下
面是我的原始码,可是执行後却直接都导致
http://my.yahoo.com/
请问大大高手可否跟小弟指点一下哪里写错了呢!!!
感谢大大><
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
'
https://login.yahoo.com/config/login?.intl=tw&.partner=&.last=&.src=wrtch&.scrumb=0&.pd=c=R.kjIs2p2e5IjYgxHnmFvubWqw--&pkg=&stepid=i&&.done=https%3a//login.yahoo.com/config/validate%3f.src=wrtch%26.pc=1164%26.scrumb=0%26.done=http%3a//www.wretch.cc/IDintegration/?ref=%25252F');
curl_setopt($ch, CURLOPT_POSTFIELDS,'login='.urlencode('我的帐号
').'&passwd='.urlencode('我的密码'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt ($ch, CURLOPT_COOKIE, $wretch_cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $wretch_cookie);
curl_setopt($ch, CURLOPT_COOKIEFILE, $wretch_cookie);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3");
echo curl_exec($ch);
?>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.46.118.74