'; if(isset($_POST['fbid']) and isset($_POST['xp']) and isset($_POST['cash']) and isset($_POST['gold']) and isset($_POST['wood']) and isset($_POST['oil']) and isset($_POST['steel'])){ if(empty($_POST['fbid'])) die('FB ID tidak boleh kosong.'); if(!sendPost($result,"ERROR 2000","http://dynamicmw.socialpointgames.com/appsfb/menvswomen/srvsexwars/get_player_info.php?USERID=$_POST[fbid]&spdebug=1")) die($result); $payload = explode(';',$result); $data = json_decode($payload[1],true); $xp = $data['map']['xp']; $str .= "Before > Slacker Games
"; $str .= "~NAME~: ".$data['playerInfo']['name']."
"; $str .= "~|CASH|~ :".number_format($data['playerInfo']['cash'],0,',','.')."
"; $str .= "~|XP|~ :".number_format($data['map']['xp'],0,',','.')."
"; $str .= "~|LEVEL|~ : ".$data['map']['level']."
"; $str .= "~|GOLD|~ : ".number_format($data['map']['gold'],0,',','.')."
"; $str .= "~|STONE|~ : ".number_format($data['map']['oil'],0,',','.')."
"; $str .= "~|WOOD|~ : ".number_format($data['map']['wood'],0,',','.')."
"; $str .= "~|STEEL|~ : ".number_format($data['map']['steel'],0,',','.')."
"; $str .= "====================================
"; $i=(integer)$_POST['xp']+(integer)$_POST['gold']+(integer)$_POST['wood']+(integer)$_POST['oil']+(integer)$_POST['steel']+(integer)$_POST['cash']; if($i==0) die("$str
"; $str .= "*NAME*: ".$data['playerInfo']['name']."
"; $str .= "*|CASH|* : ".number_format($data['playerInfo']['cash'],0,',','.')."
"; $str .= "*|XP|* : ".number_format($data['map']['xp'],0,',','.')."
"; $str .= "*|LEVEL|* : ".$data['map']['level']."
"; $str .= "*|GOLD|* : ".number_format($data['map']['gold'],0,',','.')."
"; $str .= "*|STONE|* : ".number_format($data['map']['oil'],0,',','.')."
"; $str .= "*|WOOD|* : ".number_format($data['map']['wood'],0,',','.')."
"; $str .= "*|STEEL|* : ".number_format($data['map']['steel'],0,',','.')."
"; $str .= "====================================
"; die("$str"); }else die("$str"); function sendPost(&$result,$err="ERROR",$url,$args=array(),$timeout=30){ if(isset($args['http'])) $args['http']['timeout']=$timeout; else if(isset($args['https'])) $args['https']['timeout']=$timeout; else{ if(substr($url,0,5)=="https") $args['https']['timeout']=$timeout; else $args['http']['timeout']=$timeout; } $result=file_get_contents($url,false,stream_context_create($args)); if(!$result){ $result=$err; return false; } return true; } ?>