Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 6th June 2009, 17:59
kurohit kurohit is offline
Junior Member
 
Join Date: Jun 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default plz help me in this php script

<?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."&pc t=".$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
Reply With Quote
Sponsored Links
  #2  
Old 2nd July 2009, 14:59
Tezux Tezux is offline
Member
 
Join Date: Jun 2009
Posts: 38
Thanks: 0
Thanked 2 Times in 2 Posts
 
Default

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?
Reply With Quote
Reply

Bookmarks

Tags
plz help me

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
Unable to install ISPConfig bdonecker Installation/Configuration 21 26th May 2009 09:20
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 14:06
ispconfig php 5 errors itamarjp Installation/Configuration 8 25th April 2008 11:20
Apache2 Freezes celtic Server Operation 31 28th May 2007 18:18


All times are GMT +2. The time now is 06:35.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.