i donno whether my question has issues here
i want to login www.codingforums.com
via php curl
the code i was using is :
$url = "http://www.codingforums.com/login.php?do=login";
$postfields = "vb_login_username=java_freak&vb_login_password=&s=&securitytoken=&do=login";
$cookie_file_path = "cookiejar.txt";
$fp = fopen("$cookie_file_path","w") or die("<BR><B>Unable to open cookie file $mycookiefile for write!<BR>");
$agent = "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)";
$ch = curl_init();
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
$result = curl_exec ($ch);
i'm using Tamper data plugin for FireFox to get the post data..
do the datas that i supplied earlier is enough?
when i execute the script it says "Login successful. redirecting..
but after redirecting it returned to the front page
or a working example
i just wanna learn how it's done
any lead is greatly appreciated