That website requires CURLOPT_FOLLOWLOCATION to be true because it redirects you after you posted the data.
My code is the following:
Code: Select all
$ch = curl_init("http://pussytorrents.org/comment.php?action=add");
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "text='ok'&tid=49946");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_COOKIE, 'uid=1435730; pass=d11a3799a8e1b212ba177141824ded64');
curl_exec($ch);
curl_close($ch);
Other details:
Form source code:
Code: Select all
<form method="post" action="comment.php?action=add">
<input name="tid" value="49946" type="hidden">
<textarea name="text" rows="10" cols="60"></textarea><p></p>
<p><input class="btn" value="Do it!" type="submit"></p></form>