i need help with curl to login to ipb forum board ..please check ..problem with the code below ..the user is not logined in the output ..displays the login page
Code:
<?php
$User="*****";
$Pass="******";
$url="http:///****.com/forums/index.php?app=core&module=global§ion=login";
$ch = curl_init($url);
@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
@curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "username=".$User."&password=".$Pass."");
curl_setopt ($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
$result= curl_exec ($ch);
curl_close ($ch);
print $result;
?>