Page 1 of 1

random

Posted: Thu Aug 12, 2004 6:57 pm
by SidewinderX
how do i make my php script randomally generate a code using numbers and then have the form verify that the code is right and continue the login.

Kind of like phpnuke when you log in it asks for a username and password and asks you to type in that number it generates and then it allows you to login.

Thats exactley what i want, all help is appreciated.

Posted: Thu Aug 12, 2004 7:13 pm
by feyd

Posted: Thu Aug 12, 2004 8:04 pm
by SidewinderX
ok thanks
another thing, you can pull text from a text document
ie) readfile("ips.log")
and that will display all the information in ips.log

is there a function to edit ips.log instead of just view it?

Posted: Thu Aug 12, 2004 8:28 pm
by feyd
readfile just tosses the file at the browser. If you want to save alterations that you make to a file, you'll need to use a combination of [php_man]fopen[/php_man]/[php_man]fwrite[/php_man]/[php_man]fclose[/php_man], or using regular expressions, but that can be complicated...