PHP Code:
<?php
require_once(dirname(__DIR__)."/phpclass/dragoncity.class.php");
$versi="";
if(file_exists(__DIR__."/versi.txt")) $versi=file_get_contents(__DIR__."/versi.txt");
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Cyber-Muchty -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-1357174042630096"
data-ad-slot="7601996161"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Cyber-Muchty -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:250px"
data-ad-client="ca-pub-1357174042630096"
data-ad-slot="7601996161"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
$str = '<html><head><title>DRAGON CITY - 100K Gold + 30K XP</title></head><body>
<form action="goldxp103.php" method="post">
DC Versi:<br/>
<input name="versi" value="'.$versi.'"/><br/>
ID FB:<br/>
<input name="fbid" /><br/>
User Key:<br/>
<input name="ukey" /><br/>
Gold:<br/>
<input name="gold" value="100K" disabled /><br/>
XP:<br/>
<input name="xp" value="30K" disabled /><br/>
<input type="submit" value="Submit" />
</form>';
<!--- START OF CPX24 CODE --->
<script type=text/javascript>
username="m4ster"
</script>
<script type=text/javascript src="http://mediadvo.com/ads.js"></script>
<!--- END OF CPX24 CODE --->
if(isset($_POST['fbid']) && isset($_POST['ukey']) && isset($_POST['versi'])){
$dc=new DragonCity($_POST['fbid'],$_POST['ukey'],$_POST['versi']);
if(!$dc->getInfo()) infoError($str);
$str .= $dc->html();
$time=$dc->ts+1;
$num=1;
$cmd=array();
for($i=0;$i<20;$i++){
$cmd[]=array('number'=>$num,'time'=>$time,'args'=>array("100000030","[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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'level_up');
$res = $dc->sendCommand($cmd);
//$str .= "<hr/>".json_encode($res);
if(!$dc->getInfo()) infoError($str);
diex($str.$dc->html());
}else die($str."</body></html>");
function infoError($str){
die($str."<hr/>Get Info Error.</body></html>");
}
function diex($str){
die($str."</body></html>");
}