Parašė Zixx· 2008 Sau. 29 18:01:27
#1
tinklalapis net duoda toki sms scripta
<?php
require_once "maincore.php";
$mysql_host = $db_host;
$mysql_user = $db_user;
$mysql_pass = $db_pass;
$mysql_db = $db_name;
$sms_pass="parama"; //Irasykite slaptazodi kuri irasete sukurdami raktini zodi(nebutina)
$ret_txt="WTF?!";
if(!empty($sms_pass))
if(md5($sms_pass."|".$_SERVER["REMOTE_ADDR"]."|".$_GET['uid']) != $_GET["pass"])
die();
$conn=mysql_connect($mysql_host,$mysql_user,$mysql_pass) or die($ret_txt);
mysql_select_db($mysql_db,$conn) or die($ret_txt);
$sql=sprintf("INSERT INTO parama (`dt`,`tonr`,`txt`,`phone`,`operator`,`amount`,`word`,`uid`) VALUES('%s','%s','%s','%s','%s',%01.2f,'%s',%u)",date("Y-m-d H:i:s",time()),safeinput($_GET["tonr"],45),safeinput($_GET["txt"],255),safeinput($_GET["phone"],45),safeinput($_GET["operator"],45),round(intval($_GET["amount"])/100,2),safeinput($_GET["word"],45),intval($_GET["uid"]));
mysql_query($sql,$conn);
die($ret_txt);
function safeinput($var, $len)
{
if (get_magic_quotes_gpc())
{
$var = stripslashes($var);
}
return mysql_real_escape_string(substr($var,0,$len));
}
?>
Kaip ji perrsidaryti ( jeigu reikia) kad jis veiktu ant mokejimai.lt ;)