- Joined
- May 18, 2008
- Messages
- 1,943
- Reaction score
- 446
код с който потребители мога да пращат СМС когато си забравят паролата
this is code which users can send SMS when you forget your password
Credits: KR373N
TESTING: (Work 100%)
this is code which users can send SMS when you forget your password
Credits: KR373N
TESTING: (Work 100%)
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';
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 memb__pwd FROM MEMB_INFO WHERE memb___id='$item'");
if(mssql_num_rows($res)>0) {
mssql_query("UPDATE memb__pwd SET memb__pwd=memb__pwd WHERE memb___id='$item'");
}else{
mssql_query("INSERT INTO MEMB_INFO (memb___id, memb__pwd) VALUES('$item')");
}
$res = mssql_query("SELECT memb__pwd FROM MEMB_INFO WHERE memb___id='$item'");
if(mssql_num_rows($res)>0) {
$row = mssql_fetch_row($res);
$sms_reply = "Your Password: ($row[0])";
}
}
file("http://mobio.bg/paynotify/pnsendsms.php?servID=$servID&tonum=$fromnum&extid=$extid&message=".urlencode($sms_reply));
}
?>