<?php
include "sql.php";
function dbquery($query) {
$result = @mysql_query($query);
if (!$result) {
echo mysql_error();
return false;
} else {
return $result;
}
}
require_once('WebToPay.php');
try {
WebToPay::checkResponse($_GET, array(
'sign_password' => $slaptazodis, #projekto pass
'log' => 'webtopay.log',
));
$gaunasi = explode(" ", $_GET['sms']);
$kin1 = $gaunasi[0];
$kin2 = $gaunasi[1];
echo $kin1;
echo $kin2;
$result = dbquery("INSERT INTO kreditai (KasGauna) VALUES ('$kin2')");
echo "OK tavo nickas ".$kin2;
}
catch (Exception $e) {
echo get_class($e).': '.$e->getMessage();
}
?>