However, the submitted form is rejecting the hash as having the wrong password. Is there some further munging of the password that needs to be done to generate a valid password for hashing? Or is the PHP md5() doing something different than the Perl library?
Now, I know the TalkID and the ItemID aren't the problem, which leaves me with one of two options:
1) The MD5 hashing functions work differently between PHP and Perl (which would be odd).
2) The password being used to generate the hash on LJ's side is not a clear-text password, but rather some sort of encrypted form of the password being pulled from their database
Any clues?
Edited To Add: Thank you, soph! Here is the fixed and working code:
I have written a php script through which to interface with LJ's XML-RPC interface (http://www.ratiosemper.com/xmlrpc.phps). When I supply the correct information, I can login correctly, generate a session cookie, store the session cookie, and access other parts of the LJ site that cannot be accessed via the XML-RPC interface, such as uploading user pics. I can even post and edit friend-locked entries in communities or journals.
The problem is this: when accessing the RSS feed for the community (or user), it does not display the protected entries. (if I try fetching the community or user page, it will also NOT show the protected entries)
Is there something more I should be doing? Is this even possible (I assume this is possible since LJ-Archive downloads protected entries)? (I know I can do this by posting my username/password to the login.bml, but I don't want to send my password in the clear.) (I have also tried sending the cookie as header through $curl->set_headers($header_array) and sending the 'X-LJ-Auth: cookie' header, but that didn't change anything.)
Anyone has an example on how to do digest auth in PHP via the XMLRPC interface? I'm writing a friendslocked post browser and it going to take me the better part of the week just to figure out the authentication by myself.
EDIT: I might be out of luck. the XMLRPC API does not support Digest auth, only Challenge auth. It means I can not authenticate as one user and use my credentials to look at another user's post. Des anyone know of a way to use XML to look at a friendlocked post of someone else? Or do I have to page scrape?