Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Autor
- * copyright 2011
- * SMS skripts by kennoaak@hotmail.com
- */
- // Lubame connectida ainult SMS serveril
- // Saame sõnumi sisu
- $sender = $_GET['sender'];
- $message = $_GET['message'];
- // Parooli pikkus
- $password_length = 5;
- // Parooli koostamine
- function make_seed() {
- list($usec, $sec) = explode(' ', microtime());
- return (float) $sec + ((float) $usec * 100000);
- }
- srand(make_seed());
- $alfa = "1234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM";
- $token = "";
- for($i = 0; $i < $password_length; $i ++) {
- $token .= $alfa[rand(0, strlen($alfa))];
- }
- // Tähendused
- $auasted = "Admin";
- $username = $message;
- $password = $token;
- $access = "ecfdjiub";
- $flags = "a";
- $steamid = "";
- $nickname = $message;
- $ashow = "1";
- $server_id = "1";
- $endtime=date("o-m-d G:i:s", time()+((60*60)*24*31));
- $added = date("o-m-d");
- // MySQL Ühenadmine
- $con = mysql_connect("localhost","Sinu_Andmebaas","Parool");
- if (!$con)
- {
- die('Could not connect: ' . mysql_error());
- }
- // Valime MySQL DB Ning lisame sinna username,password,access,flags,steamid,nickname
- mysql_select_db(Sinu_Andmebaas, $con);
- mysql_query("INSERT INTO `amx_amxadmins` (id, username, password, access, flags, steamid, nickname, ashow) VALUES('$id', '$username', '$token', '$access', '$flags', '$steamid', '$username', '$ashow')")
- or die(mysql_error());
- mysql_select_db(DB);
- // MySQL ID
- $result = mysql_query("SELECT * FROM amx_amxadmins ORDER BY id DESC limit 1");
- $row = mysql_fetch_assoc($result);
- $idd = $row['id'];
- mysql_query("INSERT INTO `amx_admins_servers` (admin_id, server_id) VALUES('$idd', '$server_id' )")
- or die(mysql_error());
- // Sulgeme MySQL ühenduse
- mysql_close($con);
- // Vastus mis saadetakse mängijale
- $reply = "Täname $message! Teie parool on: $token";
- // Vastuse saatmine tellijale
- echo($reply);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement