Forum Moderators: coopster
<?PHP$user="";
$pass="";
$postData="username=" . $user . "&password=" . $pass . "&act=login&submit=Login";
// login to google account
$ch = curl_init();
curl_setopt($ch, CURLOPT_COOKIEJAR, "/cookie_pb.txt");
curl_setopt($ch, CURLOPT_URL,"http://thepiratebay.org/login");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
ob_start(); // prevent any output
curl_exec ($ch); // execute the curl command
ob_end_clean(); // stop preventing output
curl_close ($ch);
unset($ch);
?>