Код:
<?PHP header('Content-Type: text/html; charset=windows-1251'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="bg">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>SMS-AMMo</title>
</head>
<body>
<title> dadaadad</title>
<style>
body {
background: #c9c9c9;
font-size: 20px;
}
</style>
<center><b>Заредете AmmoPacks в нашия Zombie Plague Chaos 6.6 .За целта са написани нашите предложения за зареждане на AmmoPacks.
Когато изпратите SMS вие ще получите обратен SMS с код който трябва да въведете по-долу на страницата в SMS системата заедно с името ви и паролата.
SMS услугата ще се активира най-късно до 24 часа.
<br>300 <font class="ws12" color="#ff0000"><span style="font-size: 8px;"></span>AmmoPacks</font> + Registration Name
(Изпратете SMS на 1092 с текст amopacks с цена <font class="ws12" color="#ff0000"><span style="font-size: 8px;"></span>2.40</font>лв с ддс) </br>
<br>600 AmmoPacks + <font class="ws12" color="#ff0000"><span style="font-size: 8px;"></span>Бонус 400 AmmoPacks</font> + Registration Name
(Изпратете SMS на 1094 с текст amopacks с цена <font class="ws12" color="#ff0000"><span style="font-size: 8px;"></span>4.80</font>лв с ддс) </br>
<br>1000 AmmoPacks + <font class="ws12" color="#ff0000"><span style="font-size: 8px;"></span>Бонус 1000 AmmoPacks</font> + Registration Name
(Изпратете SMS на 1096 с текст amopacks с цена <font class="ws12" color="#ff0000"><span style="font-size: 8px;"></span>6.00</font>лв с ддс)</br></b></center> </br>
<?PHP
function mobio_checkcode($servIDs, $code, $debug=0) {
foreach($servIDs as $servID) {
$ret = 0;
$res_lines = file("http://www.mobio.bg/code/checkcode.php?servID=$servID&code=$code");
if($res_lines) {
if(strstr("PAYBG=OK", $res_lines[0])) {
$ret = 1;
return $ret;
}else{
if($debug)
echo $line."\n";
}
}else{
if($debug)
echo "Unable to connect to mobio.bg server.\n";
$ret = 0;
}
//return $ret;
}
return $ret;
}
$servIDs = array("server ID 15321","15328","15327");
/* foreach($servID as $serv) {
$file = file("http://mobio.bg/code/checkcode.php?servID=$serv&code=$smscode");
if (preg_match("/PAYBG=OK/",$file[0])) {
//code OK
}
}*/
$smscode = $_REQUEST["smscode"];
$nick = $_REQUEST["nick"];
$password = $_REQUEST["password"];
$server = $_REQUEST["server"];
$action = $_REQUEST["action"];
# На мястото на : admin@server.com 1,2,3 се добавя e-mail които желаете да отговаря за вашия Server 1,2,3
$admins = array(
"Server 1" => "cshaskovo0@abv.bg",
"Server 2" => "cshaskovo0@abv.bg",
);
if($smscode) {
if(mobio_checkcode($servIDs, $smscode)) {
$admin_email = $admins[$server];
if($admin_email) {
$message = " Action: <b>$action</b><br/>
Nick: <b>$nick</b><br/>
Password: <b>$password</b><br/>
Server: <b>$server</b><br/>
Skype: <b>$Skype</b><br>
SMS Code: <b>$smscode</b><br/>";
mail($admin_email, "New CS {$action} request", $message, "From: cshaskovo0@abv.bg");
echo '<font color="#00FF33"><b><p><h3>Заявката ви е изпратена успешно.</h2></p></b></font>';
}else{
echo '<font color="#FF0033"><b><p><h3>Грешка. Свържете се с администратора.</font></h2></p></b>';
}
}else{
echo '<font color="#FF0033"><b><p><h3>Въведеният код е невалиден.</h2></p></b></font>';
}
}
?>
<center> <br><form method="post" action="index.php">
<table border="2">
<tr><td><font color="#FF9933">Име в сървъра:*</font></td><td><input type="text" size="15" name="nick"/></td></tr>
<tr><td><font color="#FF9933">Парола:*</font></td><td><input type="password" size="15" name="password"/></td></tr>
<td>
</select>
</td>
</tr>
<tr>
Дали в правилно място съм написал сървър ид то че не ми работи единия и ми дава една грешка от сорта
Код:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\xampp\htdocs\amo\index.php on line 93