- Katılım
- 31 May 2009
- Konular
- 772
- Mesajlar
- 4,174
- Online süresi
- 4d 8h
- Reaksiyon Skoru
- 3,477
- Altın Konu
- 1
- Başarım Puanı
- 337
- Yaş
- 33
- MmoLira
- 1,221
- DevLira
- 3
ROHAN2 WORLD 1-120 TR TİPİ OFFICIAL YOHARA, BALATHOR VE AMON! 80. GÜNÜNDE! +10.000 ONLİNE! HİLE VE BOT %100 ENGELLİ HEMEN TIKLA!
Merhaba
Örnek kodlar aşağıdaki gibidir kendi sisteminize göre panelinize entegre edebilirsiniz.
!! Uyarı !! Kendi sisteminize göre güvenlik konusunda düzenlemeler yapmanız gerekebilir aşağıdaki kodlar E-Pin sisteminin mantığını anlamanız için örnek olarak yazılmıştır.
E-Pin Bozdur:
E-Pin Oluştur:
SQL:
Örnek kodlar aşağıdaki gibidir kendi sisteminize göre panelinize entegre edebilirsiniz.
!! Uyarı !! Kendi sisteminize göre güvenlik konusunda düzenlemeler yapmanız gerekebilir aşağıdaki kodlar E-Pin sisteminin mantığını anlamanız için örnek olarak yazılmıştır.
E-Pin Bozdur:
PHP:
<?php
/**
*
* @Author Shorty
* @Web www.oyunalisveris.com
*
*/
$mysqli = new mysqli('localhost', 'root', 'şifre', 'epin');
if ($mysqli->connect_errno)
{
echo "Sorry, this website is experiencing problems.";
echo "Error: Failed to make a MySQL connection, here is why: \n";
echo "Errno: " . $mysqli->connect_errno . "\n";
echo "Error: " . $mysqli->connect_error . "\n";
exit;
}
if (isset($_POST["submit"]))
{
$stmt = $mysqli->prepare("SELECT epin, expiretime, amount FROM epin WHERE BINARY epin=? AND status=1 LIMIT 1");
$stmt->bind_param("s", $_POST["pin"]);
$stmt->execute();
$stmt->bind_result($epin, $expiretime, $amount);
$stmt->store_result();
$stmt->fetch();
if($stmt->num_rows > 0)
{
if($expiretime > time())
{
/**
*
* Hesabın bakiyesi burada güncellenecek.
* E-Pin Bakiye Miktarı $amount değişkeni ile gelmektedir.
*
*/
echo 'Hesaba Yüklenen Bakiye: '.$amount;
$accountId = 1;
$mysqli->query("UPDATE epin SET status='2', accountid='".$accountId."', usetime='".time()."' WHERE epin='".$epin."'");
}
else
{
echo "E-Pin kullanım süresi doldu.";
}
}
else
{
echo "Hatalı bir E-Pin bilgili girildi";
}
$stmt->close();
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>E-Pin Girişi</title>
</head>
<body>
<form method="post">
E-Pin: <input type="text" name="pin" value="">
<input type="submit" name="submit">
</form>
</body>
</html>
E-Pin Oluştur:
PHP:
<?php
/**
*
* @Author Shorty
* @Web www.oyunalisveris.com
*
*/
$mysqli = new mysqli('localhost', 'root', 'şifre', 'epin');
if ($mysqli->connect_errno)
{
echo "Sorry, this website is experiencing problems.";
echo "Error: Failed to make a MySQL connection, here is why: \n";
echo "Errno: " . $mysqli->connect_errno . "\n";
echo "Error: " . $mysqli->connect_error . "\n";
exit;
}
$Bakiye = 5; //Ep
$Miktar = 100; //Adet
$SonKullanmaTarihi = time() + 30 * 24 * 60 * 60; // 30 Gün sonra E-Pin kullanılamaz duruma gelir süreyi istediğiniz gibi değiştirebilirsiniz.
for ($x = 0; $x <= $Miktar; $x++)
{
$pin = Pin(16, $Bakiye);
$mysqli->query("INSERT INTO epin (epin, amount, createtime, expiretime, status) VALUES ('".$pin."', '".$Bakiye."', '".time()."', '".$SonKullanmaTarihi."', '1')");
echo $pin."<br>";
}
function Pin($lenght = 16, $amount)
{
if (function_exists("random_bytes"))
{
$bytes = random_bytes(ceil($lenght / 2) * $amount);
}
elseif (function_exists("openssl_random_pseudo_bytes"))
{
$bytes = openssl_random_pseudo_bytes(ceil($lenght / 2) * $amount);
}
else
{
die("no cryptographically secure random function available");
}
return substr(bin2hex($bytes), 0, $lenght);
}
SQL:
Kod:
CREATE TABLE `epin` (
`epin` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,
`amount` int(11) NULL DEFAULT 0 ,
`createtime` int(11) NULL DEFAULT NULL ,
`expiretime` int(11) NULL DEFAULT NULL ,
`usetime` int(11) NULL DEFAULT 0 ,
`accountid` int(11) NULL DEFAULT 0 ,
`status` int(1) NULL DEFAULT 0 COMMENT '0 : Pasif\r\n1: Kullanılabilir\r\n2: Kullanıldı' ,
UNIQUE INDEX `epin` (`epin`) USING BTREE
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=utf8 COLLATE=utf8_general_ci
ROW_FORMAT=DYNAMIC
;
Son düzenleme:
En Çok Reaksiyon Alan Mesajlar
Oyunalisveris.com için epin sistemini nasıl yapabilirim diye soran arkadaşlar faydalanabilirler
- Katılım
- 13 Eyl 2008
- Konular
- 21,048
- Mesajlar
- 36,638
- Çözüm
- 48
- Online süresi
- 5mo 21d
- Reaksiyon Skoru
- 20,131
- Altın Konu
- 0
- TM Yaşı
- 17 Yıl 8 Ay 29 Gün
- Başarım Puanı
- 854
- MmoLira
- 3,756,565
- DevLira
- -3
Oyunalisveris.com için epin sistemini nasıl yapabilirim diye soran arkadaşlar faydalanabilirler 

- Katılım
- 3 May 2012
- Konular
- 526
- Mesajlar
- 9,547
- Çözüm
- 3
- Online süresi
- 49s
- Reaksiyon Skoru
- 2,151
- Altın Konu
- 0
- TM Yaşı
- 14 Yıl 1 Ay 7 Gün
- Başarım Puanı
- 298
- MmoLira
- 77
- DevLira
- 0
Teşekkürler.
Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)
Benzer konular
Altın Konu
Hesap Satış Sistemi
- Cevaplar
- 22
- Görüntüleme
- 2K
- Cevaplar
- 37
- Görüntüleme
- 2K













