plz help me in this php script

Discussion in 'Programming/Scripts' started by kurohit, Jun 6, 2009.

  1. kurohit

    kurohit New Member

    <?php
    function Pollvote() {
    $logins = explode("\n", $_POST['fakes']);
    $pid = $_POST['pid'];
    $pct = $_POST['pct'];
    $option = $_POST['option'];
    $comentario = $_POST['comentario'];
    $cmm = $_POST['cmm'];
    function curl($a,$b,$c,$d,$e){
    $ch = curl_init();

    curl_setopt_array($ch,
    array(
    CURLOPT_URL => $a,
    CURLOPT_RETURNTRANSFER => $b,
    CURLOPT_COOKIE => $c,
    CURLOPT_HEADER => $d,
    CURLOPT_NOBODY => $d,
    CURLOPT_CUSTOMREQUEST => ($e)?"POST":"GET",
    CURLOPT_POSTFIELDS => $e
    )
    );
    $g = curl_exec($ch);
    curl_close($ch);
    return $g;
    }

    for($i=0;$i<count($logins);$i++){

    $o = "http://www.orkut.com.br/";
    $login = $logins[$i];
    $login = explode(":",$login);
    $l = $login[0];
    $l = trim($l);
    $p = $login[1];
    $p = trim($p);
    $g = "https://www.google.com/accounts/ClientLogin?Email=";

    $r = curl($g."$l&Passwd=$p&skipvpage=true&service=orkut",1,0,0,null);

    preg_match_all("/Auth=(.*)/i",$r,$r);
    $auth=$r[1][0];
    $r = curl($g."$l&Passwd=$p&skipvpage=true&service=orkut",1,0,0,null); preg_match_all("/Auth=(.*)/i",$r,$r); $auth=$r[1][0];
    if($auth=$r[1][0]) {
    $r = curl($o."RedirLogin.aspx?auth=$auth",1,0,1,null);
    preg_match_all("/orkut_state=ORKUTPREF.*/i",$r,$r);
    $cookie=$r[0][0];

    $r = curl($o."RedirLogin.aspx?auth=$auth",1,0,1,null);
    preg_match_all("/orkut_state=ORKUTPREF.*/i",$r,$r);
    $cookie=$r[0][0];


    $r = curl($o."Scrapbook.aspx",1,$cookie,0,null);
    $pos = strpos($r, "Moved Temporarily");
    preg_match_all("/value\=\"([^\"]{28,32})\"/i",$r,$r);
    $postsig="&POST_TOKEN=".$r[1][0]."&signature=".rawurlencode($r[1][1]);
    if ($pos === false) {



    ///////////////////////COPIAR ESSA PARTE PRA CADA COMUNIDADE. EDITE, INCLUSE, ESTE.///////////////////////////
    $PTSG = $postsig."&Action.join";
    $r = curl("http://www.orkut.com/CommunityJoin.aspx?cmm=90065111",1,$cookie,1,$PTSG);



    ///////////////////////COPIAR ESSA PARTE PRA CADA COMUNIDADE. EDITE, INCLUSE, ESTE.///////////////////////////


    $j = $o."CommunityJoin.aspx?cmm=".$cmm;
    $PSTG = $postsig."&Action.join";
    $r = curl($j,1,$cookie,1,$PSTG);



    $vote = $o."CommPollVote.aspx?cmm=".$cmm."&pid=".$pid."&pct=".$pct;
    $r = curl($vote,1,$cookie,1,$postsig."&option=".$option."&public_vote=1&Action.vote");

    for($coment=0;$coment<1;$coment++){
    $pool = $o."CommPollResults.aspx?cmm=".$cmm."&pid=".$pid."&pct=".$pct;
    $r = curl($pool,1,$cookie,1,$postsig."&postText=".$comentario." . &Action.submit");



    $j = $o."CommunityunJoin.aspx?cmm=".$cmm;
    $PSTG = $postsig."&Action.unjoin";
    $r = curl($j,1,$cookie,1,$PSTG);

    $PTSG = $postsig."&Action.join";
    $r = curl("http://www.orkut.com/CommunityJoin.aspx?cmm=",1,$cookie,1,$PTSG);


    }
    print ('<br>');
    print ('<center><b><font face="Comic Sans MS" size="2">'.$l.' </font>- <font color="black" face="Comic Sans MS" size="2">voted successfully --> KR ROXX \o/</b></font></center>');
    } else{
    print ('<center><b><font color="red" face="Comic Sans MS" size="2">'.$l.' - Fake dint worked</font></b></center>');
    }
    } else{
    print ('<center><b><font color="red" face="Comic Sans MS" size="2">'.$l.' - Fake dint worked</font></b></center>');
    }

    ob_flush();
    flush();
    sleep(0);
    };

    }

    if(isset($_POST['cmm'])){
    Pollvote();







    here comment will b posted which u will write in html page text box name comentario but all d time same comment will b posted



    i want differnt comment each time
    how can we can make it plz help me
    like by making loop
    etc
    or writing 15-15 diff comment in text box
    for 1 -1 comment will post


    thanx in advance
     
  2. Tezux

    Tezux New Member

    not sure if i understand the question but have you simply tried inserting the 'else if' statement? Like this

    } else{
    print ('<center><b><font color="red" face="Comic Sans MS" size="2">'.$l.' - Fake dint worked</font></b></center>');
    }
    } else if{
    print ('<center><b><font color="red" face="Comic Sans MS" size="2">'.$l.' - Fake dint worked</font></b></center>');
    }

    But I dont understand why these last to messages are the same in your script? Why do they say the same output?
     

Share This Page