- Joined
- May 18, 2008
- Messages
- 1,943
- Reaction score
- 446
това е код с който може да добавяте ресове на ваште герой с СМС
this is code that can send SMS for your add resets of your character
SEASON 3, SEASON 4 CODE
OLD VERSION CODE // 97d
this is code that can send SMS for your add resets of your character
SEASON 3, SEASON 4 CODE
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 = 'password';
$db_name = 'Muonline';
$resets = '100';
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 Resets FROM Character WHERE Name='$item'");
if(mssql_num_rows($res)>0) {
mssql_query("UPDATE Character SET Resets=Resets+'$resets' WHERE Name='$item'");
}else{
mssql_query("INSERT INTO Character (Name, Resets) VALUES('$item', '$resets')");
}
$res = mssql_query("SELECT Resets FROM Character WHERE Name='$item'");
if(mssql_num_rows($res)>0) {
$row = mssql_fetch_row($res);
$sms_reply = "Your Reset is: ($row[0])";
}
}
file("http://mobio.bg/paynotify/pnsendsms.php?servID=$servID&tonum=$fromnum&extid=$extid&message=".urlencode($sms_reply));
}
?>
OLD VERSION CODE // 97d
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 = 'password';
$db_name = 'Muonline';
$resets = '100';
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 Reset FROM Character WHERE Name='$item'");
if(mssql_num_rows($res)>0) {
mssql_query("UPDATE Character SET Reset=Reset+'$resets' WHERE Name='$item'");
}else{
mssql_query("INSERT INTO Character (Name, Reset) VALUES('$item', '$resets')");
}
$res = mssql_query("SELECT Reset FROM Character WHERE Name='$item'");
if(mssql_num_rows($res)>0) {
$row = mssql_fetch_row($res);
$sms_reply = "Your Reset is: ($row[0])";
}
}
file("http://mobio.bg/paynotify/pnsendsms.php?servID=$servID&tonum=$fromnum&extid=$extid&message=".urlencode($sms_reply));
}
?>
Last edited: