Jump to content

Worqy

Members
  • Posts

    120
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Worqy's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you all for your answers! Just to clear it up, when I asked if I should use the password in the salt I was thinking of using a salt (time + letters) + password to create a different salt that I would use to hash the password. So the password isn't saves in the database, insted I would use the password the user inputs to create the new salt to compare the hashed passwords.
  2. Should the salt be saved on the same place as the username & password? Is current time + random letters + password a good salt? Or how should I generate it?
  3. Thank you all for your answers! I've had two tests at school this week so I haven't had time to try out anything yet. I will post back on the weekend if I have some more questions.
  4. Hi! Insted of making alot of topics with just one question in them I decided to make a topic with all my short questions in it. I'm trying to make a intranet type of website that is made for smaller communities to control users and keep their staff up to date. Question 1 How should I store my MySQL username/password ? Right now I'm storing them in .php files and include them where needed. Is there a safer/better way to store them? Question 2 A Are session unique for every website? If website A has a session called "login" that is set to true can the user login to website B that also uses a session called "login" ? If true, how should I keep my session unique ? B Are sessions a good/safe way to store login information? Information like "is the user logged in", "access level" etc.. ? Question 3 How should I store critical user information like passwords ? Right now I'm using sha2 hash the passwords. Is that enough? Should all the user information (username, email...) be somehow encrypted? Any comments about website structure and/or security is welcome!
  5. So I need to rewrite a part of the rcon class im using?
  6. Ok. So for you guys to even better understand what I wan't to do, I'll paste the files: <?php Session_start(); include "config.php"; include_once("rcon.class.php"); echo "Console" . "<br />"; $r = new rcon("$serverip","$rcon_port","$rcon_password"); if($r->Auth()) { $r->rconCommand("say Logged in"); } function rcon_list() { echo $r->rconCommand("list"); } function rcon_save() { $r->rconCommand("save"); echo $->rconCommand("say Saved"); } ?> <html> <head> </head> <body> <button type="button">List</button><br /> <button type="button">Save</button><br /> </body> </html> Now by pressing the "list" button I wan't to run the function list, same with save. But I need to do this without reloading the page since it takes quite long to connect and login to the server. And ajax, could you give me an example how it would work in this case?
  7. Hi. I'm not sure if this can be solved with php, but I'll give it a shot. So I'm making a RCON webpanel, based on this code: http://fremnet.net/article/199/source-rcon-class . Now, the design of my site is going to be "console" like, a big textarea and a text field where you write the commands. My problem is that I wan't to run this piece of code: $r->rconCommand([i]TEXTFIELD DATA[/i]) whenever I press a button. But php is server-sided and what I wan't to do is kind of client-sided.
  8. Thanks, got it working
  9. Thanks for your help. But there is one problem with your script, the query ends with a ",". Like this: ), (607138,380,-357,3,48950,'XXXXX',10291,'XXXXXX',306,'idefix',492), (607924,365,-358,3,50822,'XXXX,6283,'XXXX',306,'idle',167), The script must somehow know when the last line is written, and then remove the ","
  10. Whats the easiest way to do it? You can see what the file looks like by scrolling up, 5000 insert statements. And no, I have no binary files or anything else, just a .sql file.
  11. So my best bet is to read the sql file line by line and query it while reading? Can you give me an example code of the fastest way to do this since the sql file could hold about 30 000 lines at most.
  12. By looking at sqlyog I think I need to give more info. The script that downloads the sql file runs every day, and therefore I need the "sql table uploader" to run every day automaticly. sqlyog looks more like a admin tool where you can do it yourself. Please explain more about them.
  13. This is not 2 querys, its about ~5000 rows of "INSERT INTO". INSERT INTO `x_world` VALUES (477901,104,-196,3,50503,'11',1382,'XXXX',30,'Idle',212); INSERT INTO `x_world` VALUES (477946,104,-196,3,50503,'11',1382,'XXXX',30,'Idle',220); INSERT INTO `x_world` VALUES (477974,104,-196,3,50503,'11',1382,'XXXX,30,'Idle',288); INSERT INTO `x_world` VALUES (477971,104,-196,3,50503,'11',1382,'XXXX',30,'Idle',270); ...
  14. Hi! I have a problem I need help with. My script downloads a sql file from a popular game, and the sql file is a exprted table. Now I need to import this table into my own database to make it easy to read. I tried to read the sql file line by line and query it, but it took quite long and I got a error saying I can only query 30 times in a second. Is there any easy way to import the table into my database?
  15. Hi. I need help with a PHP script that deletes mysql data. Is there some way to delete a sql row by only telling the data stored in it. Let say I have a table called "Users", with columns "Username" and "Password". Can I somehow delete is like this "DELETE FROM Users WHERE IT CONTAINS 'Kevin', 'Secret'" now it would search and see if there is any like with that data on it. I need it because I have a table with unknown column names, I only know the data stored.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.