Jump to content
Forumu Destekleyenlere Katılın ×
Paticik Forumları
2000 lerden beri faal olan, çok şukela bir paylaşım platformuyuz. Hoşgeldiniz.

Account Sistemi


Kortez

Öne çıkan mesajlar

merhaba öncelikle arama yaptığımı söylemek isterim.

Sorunum şu account sisteminde kullanıcı account adı ve mail adresini yazıyor şifre random atanıyor. kullanıcıya bilgiler mail oalrak geri dönüyor. account dosyasında account random şifre ile açılıyor. buraya kadar sorunsuz fakat maile giden bilgilerde account adı yazıyor ama şifre boş gidiyor yani şifre yazmıyor.

kod bu

account sistemi kodu

require "config.php";
require "smtp.php";
?>






if ($submit){
// Get all accounts out of accounts.scp and put them into $accounts

if (($account=="")||($email=="")){
die("Alanlari doldurun");
} else {
if(eregi("^[a-z0-9._-]+@+[a-z0-9._-]+.+[a-z]{2,3}$", $email)){

} else {
die("Mail adresi dogru formatta degil.");
}

}

$account = strtolower($account); // lowercase entered account
$account = str_replace(" ","",$account); // remove spaces

$i=0; // counter for reading file lines
$token = array("a","b","c","d","e","f","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9");
$password= $token[rand(0, 35)] . $token[rand(0, 35)] . $token[rand(0, 35)] . $token[rand(0, 35)] . $token[rand(0, 35)] . $token[rand(0, 35)]; // generate password
$emails = array("[email protected]");

// read existing accounts into $accounts
$fd = file ($sphereaccu);
while ($i<=count($fd)){
if (stristr($fd[$i], "[")){
$fd[$i]=trim($fd[$i]);
$fd[$i]=strtolower($fd[$i]);
array_push ($accounts, $fd[$i]);
}
$i++;
}

// read existing emails into $emails
$i=0;
while ($i<=count($fd)){
if (stristr($fd[$i], "EMAIL=")){
$fd[$i]=trim($fd[$i]);
$fd[$i]=strtolower($fd[$i]);
array_push ($emails, $fd[$i]);
}
$i++;
}

// read accounts awaiting to be activated into $accounts
$fd = file ($sphereacct);
$i=0;
while ($i<=count($fd)){
if (stristr($fd[$i], "[")){
$fd[$i]=trim($fd[$i]);
$fd[$i]=strtolower($fd[$i]);
array_push ($accounts, $fd[$i]);
}
$i++;
}

// read more emails into $emails
//$fd = file ($sphereacct);
$i=0; // reset counter for next file
while ($i<=count($fd)){
if (stristr($fd[$i], "EMAIL=")){
$fd[$i]=trim($fd[$i]);
$fd[$i]=strtolower($fd[$i]);
array_push ($emails, $fd[$i]);
}
$i++;
}

// look for entered account name
$b=0;
$result="ok";
while ($b<=count($accounts)){
$account2="[ . $account . ]";
if ($accounts[$b]==$account2){
echo "$error_account

";
print_form();
$b=count($accounts)+1;
$result="no";

}else{
$b++;
}
}

// check emails :)
$b=0;
while ($b<=count($emails)){
$email2="email=" . $email . "";
if ($emails[$b]==$email2){
echo "$error_email

";
print_form();
$b=count($emails)+1;
$result="no";

}else{
$b++;
}
}

if ($result=="ok"){
$fd = fopen ($sphereacct, "a+");
fwrite ($fd,"n[ . $account . ]n");
fwrite ($fd,"PASSWORD=" . $email . "n");
fwrite ($fd,"EMAIL=" . $email . "n");
fwrite ($fd,"n");
$smtp=new smtp_client();
$smtp->email("[email protected]", $email, $email, $header[0], "Your $shardname Account!", $email_body);
$smtp->send();
print_sucess();

?>

}

}else{
print_form();
}
?>





config


$shardname = "Myshard";

$shardweb = "http://myshard.net";

$sphereaccu = "C:sphereaccountssphereaccu.scp";

$sphereacct = "C:sphereaccountssphereacct.scp";

// Location of your smtp server (ask your ISP)
$smtp_server = "ip no";

$accounts = array("[eof]","[admin]","[add]","[update]","[unused]","[.]","[plevel]","[password]","[account]"); // array of known accounts

$error_account = "Bu account adi kullanilmis yada uygun degil.";

$error_email = "Bu mail adresiyle account alinmis.";

$email_body=" $shardname Uyelik bilgileriniz.nn Account: $account n Password: $password nn Site : ($shardweb) adresini ziyaret ederek myshard hakkinda bilgi alabilirsiniz..
nnn Www.myshard.net";

// ADVANCED OPTIONS, SEE DOCUMENTATION

function print_sucess(){
?>
Accountunuz olusturuldu


Mail adresinize sifreniz gonderildi.Mailinizin Junk ( Gereksiz ) Postalarinizi kontrol ediniz. Ilk saveden sonra oyuna girebilirsiniz..



Account Bilgilendirme:

  • Accountlar her bir dakikada bir aktif edilir.

  • !!! Dikkat : Bir hafta boyunca girilmeyen accountlar otomatik silinmektedir..


  • }

    function print_form(){
    ?>







    Account Name:
    Email:


    Mail adresinizi dogru girmediginiz taktirde
    accountunuz acilmayacaktir.
    Aktivasyon icin gereklidir.



    }

    ?>



Yardımlarınız için şimdiden teşekkür ederim.
Link to comment
Sosyal ağlarda paylaş

×
×
  • Yeni Oluştur...