[Release] SMS Buy Point

KR373N

Well-Known Member
Joined
May 18, 2008
Messages
1,943
Reaction score
446
този код дава определен брой точки за вдигане на даден герой чрез СМС ето го и самия код който зарежда точките за LevelUpPoit

This is the code by SMS which will be characters in the server to purchase points for up
PHP:
<?PHP

$item = $_REQUEST["item"];
$fromnum = $_REQUEST["fromnum"];
$extid = $_REQUEST["extid"];

$mobio_remote_addrs = array("87.120.176.216", "194.12.244.114");

$servID = $_REQUEST["servID"];

$db_serv = '127.0.0.1';
$db_user = 'sa';
$db_pass = 'sql pass';
$db_name = 'MuOnline';
$point = '1000';

if(in_array($_SERVER['REMOTE_ADDR'], $mobio_remote_addrs)) {

        $sms_reply = 'Greshka.Spazvaite tochno instrukciite.';
        $conn = mssql_connect($db_serv, $db_user, $db_pass);
        if($conn) {
                mssql_select_db($db_name);
                $res = mssql_query("SELECT LevelUpPoint FROM Character WHERE Name='$item'");
                if(mssql_num_rows($res)>0) {
                        mssql_query("UPDATE Character SET LevelUpPoint=LevelUpPoint+'point' WHERE Name='$item'");
                }else{
                        mssql_query("INSERT INTO Character (Name, LevelUpPoint) VALUES('$item', '$point')");
                }

                $res = mssql_query("SELECT LevelUpPoint FROM Character WHERE Name='$item'");
                if(mssql_num_rows($res)>0) {
                        $row = mssql_fetch_row($res);
                        $sms_reply = "vashite to4ki sa uspeshno zakupen. Imate {$row[0]} Points.";
                }

        }
        file("http://mobio.bg/paynotify/pnsendsms.php?servID=$servID&tonum=$fromnum&extid= $extid&message=".urlencode($sms_reply));
}


?>
 
ако се пипне кода може да се направи да се дава до определен брой точки но трябва да се пипа по самия код зада се направи :)
 
А ще можите ли да направите 1 код за cspoints за CashShop-a ?
 
PHP:
<?PHP

function mssql_real_escape_string($str) { return str_replace("'","''",$str); }



$item   = mssql_real_escape_string($_REQUEST["item"]);
$fromnum  = mssql_real_escape_string($_REQUEST["fromnum"]);
$extid   = mssql_real_escape_string($_REQUEST["extid"]);

$mobio_remote_addrs = array("87.120.176.216", "194.12.244.114");

$servID  = 1101;

$db_serv = '10.0.2.10';
$db_user = 'sa';
$db_pass = 'password';
$db_name = 'MuOnline';
$credits_to_add = '500';

if(in_array($_SERVER['REMOTE_ADDR'], $mobio_remote_addrs)) {

	$sms_reply = 'Greshka. Spazvaite to4no instrukciite';
	$conn = mssql_connect($db_serv, $db_user, $db_pass);
	if($conn) {
		mssql_select_db($db_name);
		$res = mssql_query("SELECT credits FROM MEMB_CREDITS WHERE memb___id='$item'");
		if(mssql_num_rows($res)>0) {
			mssql_query("UPDATE MEMB_CREDITS SET credits=credits+'$credits_to_add' WHERE memb___id='$item'");
		}else{
			mssql_query("INSERT INTO MEMB_CREDITS (memb___id, credits) VALUES('$item', '$credits_to_add')");
		}
		
		$res = mssql_query("SELECT credits FROM MEMB_CREDITS WHERE memb___id='$item'");
		if(mssql_num_rows($res)>0) {
			$row = mssql_fetch_row($res);
			$sms_reply = "Vashite krediti sa uspeshno zakupeni. Imate {$row[0]} crediti.";
		}

	}
	file("http://mobio.bg/paynotify/pnsendsms.php?servID=$servID&tonum=$fromnum&extid=$extid&message=".urlencode($sms_reply));
}
?>
 
  • Like
Reactions: A$$Kicker
PHP:
<?PHP

function mssql_real_escape_string($str) { return str_replace("'","''",$str); }



$item   = mssql_real_escape_string($_REQUEST["item"]);
$fromnum  = mssql_real_escape_string($_REQUEST["fromnum"]);
$extid   = mssql_real_escape_string($_REQUEST["extid"]);

$mobio_remote_addrs = array("87.120.176.216", "194.12.244.114");

$servID  = 1101;

$db_serv = '10.0.2.10';
$db_user = 'sa';
$db_pass = 'password';
$db_name = 'MuOnline';
$credits_to_add = '500';

if(in_array($_SERVER['REMOTE_ADDR'], $mobio_remote_addrs)) {

	$sms_reply = 'Greshka. Spazvaite to4no instrukciite';
	$conn = mssql_connect($db_serv, $db_user, $db_pass);
	if($conn) {
		mssql_select_db($db_name);
		$res = mssql_query("SELECT credits FROM MEMB_CREDITS WHERE memb___id='$item'");
		if(mssql_num_rows($res)>0) {
			mssql_query("UPDATE MEMB_CREDITS SET credits=credits+'$credits_to_add' WHERE memb___id='$item'");
		}else{
			mssql_query("INSERT INTO MEMB_CREDITS (memb___id, credits) VALUES('$item', '$credits_to_add')");
		}
		
		$res = mssql_query("SELECT credits FROM MEMB_CREDITS WHERE memb___id='$item'");
		if(mssql_num_rows($res)>0) {
			$row = mssql_fetch_row($res);
			$sms_reply = "Vashite krediti sa uspeshno zakupeni. Imate {$row[0]} crediti.";
		}

	}
	file("http://mobio.bg/paynotify/pnsendsms.php?servID=$servID&tonum=$fromnum&extid=$extid&message=".urlencode($sms_reply));
}
?>

that is code for sms credits ? can i work it in greece? i wanna tell nobody can help me with it. can players send sms and i get offer of sms ? what need to do?