I'm using data from another server (not my server) and I need to login to this server. So I need to know password for every user account. I need to send this password to the server through HTTP request (no problem). But the server expect unsecure password.
So if the password is '123456' I have to send POST request with data:
"username=user&password=123456"
I can not use md5 function because after it I am not able to get back the password so my question is how can I encode this password? Is exists some common PHP function for this? For example:
$securePassword = php_encode("123456", "mykey")
php_decode($securePassword, "mykey")
Because I just do not want to store to my database "123456"