(Bumping this up from earlier comments in the hopes of assistance.)
I'm stuck on one issue. I've used the form sent out via comment emails as a basis, but I'm having a hard time generating the ECP hash.
In talklib.pl, the hash is generated like so:
sub ecphash
(
Read more... )
Comments 11
Reply
I'm doing that in the live code.
Reply
Reply
As mentioned above, I'm doing that in the live code.
Reply
ciaran@neo:~$ php
82da61aa724b5d149a9c5dc8682c2a45
ciaran@neo:~$
ciaran@neo:~$ perl
use Digest::MD5;
print Digest::MD5::md5_hex("md5test") . "\n";
82da61aa724b5d149a9c5dc8682c2a45
ciaran@neo:~$
Yes, they do the same. :D The "ecph" thing would be what's causing it - you're not prepending "ecph-" to the hash.
Reply
Okay, so they do the same...has anybody tried this with the actual data it's supposed to be hashing? My concern is that the 'password' component isn't a clear-text password, but rather, something pre-encrypted and pulled from LJ's database.
Reply
The itemid you want is *not* the ID that's passed in the "itemid" field of the form (which is its ditemid), but instead the jitemid, which can be found as int($ditemid / 256). So for this comment I'm replying to, for example, the entry itemid is 786311, but its jitemid, which is what I need to hash, is int(786311 / 256) = 3071. Has together "307133966my plaintext password here" and you'll get the hash you want.
The parenttalkid is calculated in a similar way - the displayed comment ID here is 8695687, but the ID that you want to pass is int(8695687 / 256) = 33967. However, you're given this figure in the form already, so you don't have to calculate it yourself. [edit: Well, okay, maybe it's that -1 for the comment ID... but I know it's right for the entry ID.]
Reply
SUCCESS!
Thank you!
Reply
do you know how i can post a new post ?
i mean wich form variables i need and how i'm calculating the item IDs in that case ?
thanks a lot.
Reply
You shouldn't need to figure out any of that stuff. Just use the XML-RPC interface with the parameters described here:
http://www.livejournal.com/doc/server/ljp.csp.flat.postevent.html
Many languages have XML-RPC interfaces. PHP's, for example, is described here:
http://ca.php.net/manual/en/ref.xmlrpc.php
Reply
Leave a comment