Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm coding a CMS, but does this work?
MD5(MD5(username+password)+salt+rsalt);
The rsalt stands for Randomized salt but how can i randomize a salt anyway?
You can randomize the salt if you are storing said salt in the user's table. Otherwise, how will you be able to tell if the hash is correct?
MD5 is not a secure hash function. You should use something like password_hash if you have PHP >= 5.5 or the password_compat library by ircmaxell if you're using an earlier version.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I just received a source from my customer (it's written by PHP Generally), I try to read it and glance at database. I realize that it's very mess, some webpage's content is also saved in database. So, I want to find files are using by browser and I mean that php files, I want to edit them. Can I do that?
P/S: I'm sorry if this article bother you
Hi At any point you need to know what functions, what includes and what arguments are being passed just use debug_print_backtrace() function in your code.
for further reading follow http://www.php.net/manual/en/function.debug-print-backtrace.php
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have an application written in php Ver. 3.
The application has a users file with usernames and passwords. The passwords are encrypted using the PASSWORD() function.
We need to transfer this file and utilize it under a system using php 5.
We tried to use the password() function again to check the validity of a password entered by the user, but the encrypted results don't match.
Any ideas?
Thanks.
PHP has never had a PASSWORD() function. If you're talking about the MySQL function, the hashing algorithm was change in MySQL 4.1 (a long time ago). You can use OLD_PASSWORD() to generate password hashes using the old method, or you can set the old_passwords system variable to have MySQL default to it.
In any case you should make arrangements to migrate from the old system to the new one. Since you can't know what the old password was, you'll probably need to code a mechanism to force users to change their passwords and track which version they're using.
The MySQL reference on this is here
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I have a MySQL database with a PHP scripts written to exploit the database. I'm writing a program in C++ and want to access the PHP classes to power the application.
How should I go about doing this?
If I have a PHP function I want to get a return value from, how do I do this in C++? Is it even possible?
curl is a general one for C++. If you are using Qt then I would suggest QNetworkAccessManager class. It has functions get and post to handle HTTP GET/POST request.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I need to get the schedules of each class from this list: http://timeplan.uia.no/swsuiakrh/public/en/default.aspx
Is there an easy way to do it? I have heard of datamining but i have no idea what it is, any good tutorials for it?
Use cURL to fetch the page and then use something like DomDocument to get the exact data that you want.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How can I generate md5 string with upper and lowercase letter?
for example: TyUTExUM3Dw
What I’ve tried
$id = $_GET['id'];
$key = "SecreTkEy";
$hash = md5($id.$key);
echo $hash;
The string "TyUTExUM3Dw" is not an MD5 hash, nor anything close to one.
An MD5 hash is a number, and is usually written in hexadecimal which uses 16 digits represented by 0-9 and A-F.
Casing is not important.
The hashes b529d8871187ecc7fe5f152142b3440a and B529D8871187ECC7FE5F152142B3440A are exactly the same.
What is the end goal you're trying to accomplish with your code? If you tell us that we can probably give you a better method to accomplish that.