Does anyone know how to get the uname and esp the psword from Wordpress to pass into the remotepost.class开发者_运维问答.php
eg private $uname = $current_user->user_login; private $pass = '???';
This is related to this question: How to use XML-RPC metaWeblog.newPost properly with PHP?
As Tim Post says, you can't get the password. In any good system, passwords are hashed rather than encrypted. Hashing is a one-way function - you cannot un-hash a hashed password, which prevents those with access to a user database from knowing the stored passwords.
On top of this, Wordpress applies a salt to the password before hashing, so even if it was possible to un-hash the password, you'd need to know which part is the password and which part is the salt.
精彩评论