Facebook Tetris

04/01/2014 12:06 Darkmage33#1
How to update this script ?


<?php
session_start();
error_reporting(0);

function file_get_contents_curl($url) {
$ch = curl_init();

curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);

$data = curl_exec($ch);
curl_close($ch);

return $data;
}

if(isset($_POST['source'])){
preg_match_all('/Tetris\.config\.ticket \= (.*)\;/', $_POST['source'], $ticketoutput);
preg_match_all('/\\\'(.*?)\\\'/', $ticketoutput[1][0], $ticketoutput2);
$ticket_tetris = str_replace("\\", "", $ticketoutput2[1][0]);


preg_match_all('/Tetris\.config\.userID = (.*)\;/' , $_POST['source'] , $user);
preg_match_all('/\\\'(.*?)\\\'/', $user[1][0], $user2);
$user_tetris = str_replace("\\", "", $user2[1][0]);

if(!empty($user_tetris) || !empty($ticket_tetris)){
$_SESSION['ticket'] = $ticket_tetris;
$_SESSION['user'] = $user_tetris;
}
else{
$error = "CODE 331 Invalid Source Code";
}
}


if(isset($_POST['getCoin'])){
$cash = $_POST['cash'];

if($cash > 300 || $cash <= 0){
$error = "CODE 131 Invalid CASH Number";
}

if(empty($error)){
$i = 0;
$cash = 300 * $cash;

do{
$i++;
$urls = 'http://tbc.tetrisfb.com/api/purchase?ticket='.$_SESSION['ticket'].'&fbuid='.$_SESSION['user'].'&currencyType=2&currencyValue=1';
$file_content = file_get_contents_curl($urls);
}

while ($i <= $cash);

session_unset();
$done = "Done! Refresh your tetris for Changes";
}
}
?>
04/02/2014 21:27 Bgzocker#2
What does not work?

Wrong section!
04/03/2014 11:29 Lawliet#3
#moved
04/09/2014 13:33 irwansyahDoank#4
that script from Zulfaqar Malaysia