Siemka, potrzebuję połączyć 2 skrypty ze sobą.
Pierwszy to Whitelista do serwera MineCraft
a drugi to skrypt płatności SMS w dotpay'u
to skrypt sprawdzający czy dany kod jest aktywny (nie zużyty):
<?php
echo file_get_contents('http://dotpay.pl/check_code_fullinfo.php?type=sms&del=1&id=34286&code=LESSER&check=' . $sms); ?>
A tutaj kod z indexu który najprawdopodobniej trzeba przerobić :
<?php
$finish = false;
include("config.php");
require_once("libs/recaptchalib.php");
$error= "";
function Valid(){
include("config.php");
$resp = recaptcha_check_answer ($recaptcha_privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
if ($resp->is_valid or $recaptcha_enabled == false) {
if(isset($_POST["username"]) and
strlen($_POST["username"]) > 0 and
$_POST["username"] != ""){ if($con == null){
$error = "<span style='color: #990000;'>MySQL error: " . mysql_error() ."</span>"; return $error;
}
if($db == null){
$error = "<span style='color: #990000;'>MySQL error: " . mysql_error() ."</span>"; return $error;
}
$result = @mysql_query("INSERT INTO `$table` (`name`) VALUES ('$IngameUsername');"); if($result == null){
$error = "<span style='color: #990000;'>MySQL error: " . mysql_error() ."</span>"; return $error;
}
$error = "<span style='color: #009900;'>You are now added to the whitelist. Please wait a few minutes before trying to connect!</span>";
return $error;
}else{
$error = "<span style='color: #990000;'>You need to enter your minecraft username!</span>";
return $error;
}
}else{
if(isset($_POST["formsent"])){ $error = "<span style='color: #990000;'>Wrong captcha entered!</span>";
return $error;
}
}
}
$error = Valid();
?>
<html>
<head>
<title>Whitelist User</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="js/custom-form-elemtents.js"></script>
<link rel="stylesheet" href="css/default.css" media="screen" />
</head>
<body>
<div class="wrapper">
<fieldset>
<legend>
Whitelist submission
</legend>
<form method="post" action="">
<?php
if($recaptcha_enabled){
echo "Anti-bot verification:<br />"; echo recaptcha_get_html
($recaptcha_publickey); }
?>
Minecraft username:<br />
<input type="hidden" id="formsent" name="formsent" />
<input type="text" id="username" name="username" class="input" />
<input type="submit" class="submit"/>
</form>
<?php
?>
</fieldset>
</div>
</body>
</html>
Config:
<?php
$host = "localhost";
$username = "";
$password = "";
$db = "";
$table = "";
//Re-captcha
$recaptcha_enabled = false;
$recaptcha_publickey = "";
$recaptcha_privatekey = "";
?>
To na tyle, jak będzie coś jeszcze potrzebne to pisać w tym temacie, z góry dziękuje za pomoc i wysiłek

!