Размер файла: 1.4Kb
<?php
/*
Регистрация через БМ.
Автор: Denvas
*/
include_once("config.php");
include_once("session.php");
$fd=fopen($path_log."/wappc.log","ab");
if($fd){
fwrite($fd,date("Y-m-d H:i:s", time())."|".$_SERVER["REQUEST_URI"]."|".strtr(var_export($_POST,true),array("\n"=>" ","\r"=>"","\0"=>"\\0"))."|".(isset($_SERVER['HTTP_USER_AGENT'])?$_SERVER['HTTP_USER_AGENT']:"")."|".$_SERVER['REMOTE_ADDR']."|".(isset($_SERVER['HTTP_COOKIE'])?$_SERVER['HTTP_COOKIE']:"")."|".(isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:"")."\n");
fclose($fd);
};
if(empty($_GET["ts"])){print "1";exit;};
if(empty($_POST["amount"])){print "2";exit;};
if(empty($_POST["from"])){print "3";exit;};
if(empty($_POST["to"])){print "4";exit;};
if(empty($_POST["signature"])){print "5";exit;};
if(empty($_GET["ses"])){print "6";exit;};
if(strcmp($_POST["signature"],md5($_GET["ts"].$_POST["amount"].$_POST["from"].$_POST["to"].$wappc_secretkey))!=0){print "7";exit;};
if(!empty($_GET["ses"])){
$data["session"]=$_GET["ses"];
$ses=GetSession($data["session"]);
if(!is_array($ses))NewSession($data["session"],0);
}
$data["amount"]=$_POST["amount"]*$wappc_balance/$wappc_price;
$ses=GetSession($data["session"],$data["amount"]);
print "Ok\nТеперь Вы можете качать на ".$data["amount"]." ".$namecurrency[1].".\n";
?>