Jump to content

SFB

Members
  • Posts

    282
  • Joined

  • Last visited

Everything posted by SFB

  1. SFB

    Login Script & Security

    how do i store the data in variables in file? you make it seem like i dont even have to write to that file. if there is a better way to add the variables to the file that the variables are sored in please tell me now!
  2. SFB

    Login Script & Security

    hey i was working on a regester script. is there a good way to write datat before the ?> in a php file? that is the main reason i was using a txt file but this way seems like it will work if i can write data before the ?>
  3. what types of security issues does it have?
  4. ok thanksis this actually like a real server?could it be used to host my own site?i keep getting this error in my php and i cant figure out what i have to change. Warning: include(/Program Files/xampp/htdocs/template/nav/snav.txt) [function.include]: failed to open stream: No such file or directory in C:\Program Files\xampp\htdocs\sfb\index.php on line 42everything worked on dan's server why doesnt it work on this thing. i changed all of the locations but it still isnt working
  5. hey LG, I downloaded xampp, where do i sart? i am so lost....
  6. oops, yes i ment program. thanks for the link
  7. My site is down and i want to test some php scripts. i was wondering if there is some problem that would allow me to test them on my computer.
  8. SFB

    www & non-www

    yes my question was answerd. i was just looking for information on the purpose of www. and i think i understand now. I have both and the w's redirect to the non w's just incase someone types them in. thanks for all the info
  9. SFB

    www & non-www

    I think i was a little confusing. I have both but the www. redirects to the non-www. What i was trying to say is that sometimes search engines think that www.snowforts.ath.cx would be duplicate content to http://snowforts.ath.cx therefore it would be bad to have both www an the non www without one redirecting to the other. i never ment that if you have www. your site shouldnt have http:// or those other protocols.
  10. SFB

    \n\r problems

    you could also write a script to disply your log in a more appealing way when your data is in a txt file as well.
  11. SFB

    Login Script & Security

    ok let me say this once again my site is down. i cant test things now. It seems like if i put the include at the verry top insted of somwhere in the middle it should work. one of the reasons it wasnt working was because i went include (http://snowforts.ath.cx/whatever) so the server was only getting the output not the php with all the variables in it. just a little note include and require are bassically the same but they are a little different. for what i am doing they should act the same. i prefer include over require but i use both.
  12. SFB

    www & non-www

    My site that is currently down does not use the www. some people have told me that i should change to www. but i havent found enough information saying that i should. on all the search engines my site is http://snowforts.ath.cx so i would need a good reason to change over. I know that you shouldnt have both http:// and www. and i dont. I would also like to know a little more about putting the www. in front does other than making you type three more letters.
  13. SFB

    Login Script & Security

    ok thanks for all the help. Currently my site is down and probably will be for another week. dan from the dcole server was moving servers and tried to take the hard drive from the old server and put it into the new one. I knew he was planning this when i talked to him at school but when i came home the server was offline before i could backup my data. it ended up in that dan lost lots of data and his server isnt working. he is waiting for mitch but mitch is too bussy to fix it. I should really get my own server. i wish i could show you an example of when i was getting the server's ip but the server is down. it was happening because i had it print the variable on the file that was being included. i was also using include(http://mysite/example.php) which was dumb. thanks again for all your help!
  14. ok sorry, i guess we can make a subdomain on dcole.ath.cx (example something.dcole.ath.cx)like dan said but the downtime has changed now.
  15. hey Dcole, where you said web adress didnt you mean to have http://SITE.ath.cx/ insted of http://SITE.dcole.ath.cx? If you didnt know i am hosted by dcole.ath.cx. I wouldnt say the uptime is 99.97% anymore. the ip to his site changes occasionialy so if you have the http://Site.ath.cx option you have to update you ip on dyndns.com. and lol dan just lost lots of data upgrading his server. good thing he has old backups.
  16. SFB

    Login Script & Security

    ok my only problem is that when I include or require another php file, the variables and arrays and most other things seem to be just for that page. i can use them in the page i am including them in. do you get this or not? lets say i make a script that gets the person's ip address. then I use include() or require() and test it out. I get the ip address of the server not the visitor and lets say i also set a variable had their ip in it and wanted to print it on my page the variable acts as if it wasn't set. If you need a better clarification i could try and explain it again.
  17. SFB

    Login Script & Security

    The way i am doing it now is very similar ony i use fopen and explode to make some arrays what i do currently looks like this is the userdata.php file (all usernames, passwords, and emails are made up <?php<||>//<->sfb<->ru6g8oz<->john<->jones<->snowfort@gmail//<->mittens<->123456789<-><-><->dogs_drue@gmail.com//<->patches<->987654321<-><-><->cool_cat@gmail.com<||>?> this is the login script it still needs some work after the password and username match but you can get the idea <?php$userlogedin = "FALSE";$username = $_POST["username"];$password = $_POST["password"];if($username != "")){$file = fopen("/Inetpub/wwwroot/sfb/testfiles/login3/userdata.php", "r");$filesize = filesize("/Inetpub/wwwroot/sfb/testfiles/login3/userdata.php");$text = fread($file, $filesize);fclose($file);$users = explode("<||>", $text);$lines = explode("\n", $users[1]);$size = sizeof($lines);for($i = 0; $i < $size; $i++){$userdata = explode("<->", $lines[$i]);if(($userdata[1] == $username) and ($userdata[2] == $password)){$email = $userdata[3];$username = $userdat[1];$userlogedin = "TRUE";print"$username<br>$email<br>";}}}if($userlogedin == "TRUE"){print"The password and username match";}else{print"the username and password do <u>not</u> match!";}print" <br><br>this is the login page";?> i just dont like useing a php file to store data in. so if all possible i want to put it in a txt file so my data would look like sfb<->ru6g8oz<->john<->jones<->snowfort@gmailmittens<->123456789<-><-><->dogs_drue@gmail.compatches<->987654321<-><-><->cool_cat@gmail.com
  18. SFB

    Login Script & Security

    I had a .htpassword file and a .htaccess file and for some reason it didnt do anything. I had actually used the link you had posted before i posted.
  19. I dont know if this is exactly what you want but it is what i use. you can get a free subdomain at http://dyndns.com then they will redirect that or something to your server. all you have to do is give them your ip of your server. it works well if you have a static ip.
  20. I have made a login script but anyone that wanted to could easily decode it. I keep the things like passwords and usernames and stuff in a txt file. i tried to protect it with .htaccess but it appeared not to work. I dont have access to much on the server. I am hosted by dcole.ath.cx and he wont give me any non web place for a file. I dont know how to use any databases and dont really feel like figureing out how to. so bassically i want a txt file lets say userdata.txt to not display content in somone's browser. I think the dcole server is a windows one if that helps anyone. I figured out a way that might work but it isnt very good coding. I have hidden all my userdata in a php file in a multi line comment. then I take the data out of the comment and use it. its a lot of work and doesnt seem much safer. sorry i dont have an example of a non working .htaccess file at the moment.
×
×
  • Create New...