PHPBB Forum Auto poster

Discussion in 'PHP' started by bharan_n, May 6, 2009.

  1. #1
    I need help developing phpbb autoposter.

    I am dng some mistake so i was not able to achieve it.

    could any give me suggestions to achieve auto posting..

    I will pay $10.00 for the person who can help me achieve phpbb auto posting.

    This is for logging into phpbb which is working


    // -----------------------------

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_POST,4);
    curl_setopt($ch, CURLOPT_POSTFIELDS,$post_fields);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
    // curl_setopt($ch, CURLOPT_FOLLOWLOCATION,1);
    curl_setopt($ch, CURLOPT_COOKIEJAR,"cookie6.txt");
    $result= curl_exec($ch);
    $error=curl_error($ch);
    curl_close ($ch);
    // -----------------------------

    This is the code for posting a new topic where i am actually dng the mistake

    // ----------------------------------------

    $sid1 = explode("sid=",$result);
    $sid2 = explode('"',$sid1[1]);


    $lurl = "http://www.geturfile.com/phpbb/posting.php?mode=post&f=2";
    $ch1 = curl_init();
    curl_setopt($ch1, CURLOPT_URL,$lurl);
    // curl_setopt($ch1, CURLOPT_POST, 1);

    curl_setopt($ch1,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch1,CURLOPT_COOKIEFILE,"cookie6.txt");
    $result1= curl_exec ($ch1);
    curl_close ($ch1);
    // echo $result1;
    $wsql = new htmlsql();

    // connect to a URL
    if (!$wsql->connect('string',$result1))

    {
    print 'Error while connecting: ' . $wsql->error;
    exit;
    }

    if (!$wsql->query('SELECT * FROM input where $name == "form_token"'))
    {
    print "Query error: " . $wsql->error;
    exit;
    }



    // echo $sid2[0];
    foreach($wsql->fetch_array() as $row)
    {}

    $form_token1 = $row["value"];

    $subject = 'There is lot of subject';

    $message = 'here is lot of message.There is lot of message.There is lot of message';
    $forum_id = "2";

    $post_fields1 = array(
    'mode' => 'post',
    'f' => $forum_id,
    'message' => $message,
    'subject' => $subject,
    'disable_bbcode' => 0,
    'disable_smilies' => 0,
    'attach_sig' => 1,
    'topic_type' => 0,
    'topic_time_limit' => 0,
    'creation_time' => 1241549667,
    'lastclick' => 1241549667,
    'form_token' => $form_taken,
    'poll_title' => '',
    'poll_max_options' => 1,
    'poll_length' => 1,
    'sid' => $sid2[0],
    'post' => 'Submit'

    );


    $ch1 = curl_init();
    curl_setopt($ch1, CURLOPT_URL,$lurl);
    curl_setopt($ch1, CURLOPT_POST, 4);
    curl_setopt($ch1, CURLOPT_POSTFIELDS, $post_fields1);
    curl_setopt($ch1,CURLOPT_RETURNTRANSFER,1);
    curl_setopt($ch1,CURLOPT_COOKIEFILE,"cookie6.txt");
    $result1= curl_exec ($ch1);
    curl_close ($ch1);
    echo "result :-->".$result1;

    // ------------------------------------------------
     
    bharan_n, May 6, 2009 IP