$resource = $_POST [ 'resource' ];
$host = 'o.nimbuzz.com' ;
$port = '5222' ;
$server = 'nimbuzz.com' ;
$user = $_POST [ 'user' ]; $password = $_POST [ 'password' ];
$jml = $_POST [ 'rel' ];
$timer = $_POST [ 'timer' ];
$body = $_POST [ 'text' ];
$body1 = $_POST [ 'text1' ];
$body2 = $_POST [ 'text2' ]; $body3 = $_POST [ 'text3' ];
$body4 = $_POST [ 'text4' ];
$body5 = $_POST [ 'text5' ];
$room = $_POST [ 'target' ];
$to = "$room@conference.nimbuzz.com" ;
$type3 = 'groupchat' ; include 'XMPPHP/Log.php' ; include 'XMPPHP/XMPP.php' ;
for ( $i =0; $i <= $jml ; $i ++)
{
$folderNames = explode ( '#' , $user );
foreach ( $folderNames as $colors ) {
$arym =( $colors ); $conn = new XMPPHP_XMPP( $host , $port , $arym ,
$password , $resource , $server , $printlog =false,
$loglevel =XMPPHP_Log::LEVEL_INFO); $conn -
>connect(); $conn ->processUntil( 'session_start' );
$conn ->presence(NULL, "bot" , "$to/$arym" ,
"available" ); $conn ->message( $to , $body , $type3 ); $conn -
>message( $to , $body1 , $type3 ); $conn -
>message( $to , $body2 , $type3 ); $conn -
>message( $to , $body3 , $type3 ); $conn -
>message( $to , $body4 , $type3 ); $conn -
>message( $to , $body5 , $type3 ); $conn - >presence(NULL, "bot" , "$to." / ".$arym" ,
"unavailable" );
sleep( $timer );
} }
$conn ->disconnect(); echo "pludke$target dah
terkirim" ; ?>