bgarmisa (bgarmisa) wrote in lj_clients,

Accessing Comments via PHP


I'm working on my website, which grabs the XML feed of my journal and displays the posts there... I'm adding some AJAX into the mix (as you can see by clicking "drink the melanade" at ) also. I'd love to be able to use AJAX to display comments underneath each post when someone clicks "see who drank the melanade." The problem with this is that the only way I can see to export comments is by using the comment exporting tool (using a php f_open call similar to "")...

This poses a multitude of problems... The first being that I believe you need to login in order to view comments... I can't figure out a way to get PHP to send a cookie *to* I've figured out how to use sessiongenerate to generate a session ID, but I don't know if there's any way to have PHP send that session ID back to the server...

The second problem that arises here is that the comment exporting tool only displays "jitemid" to reference which journal entry any given comment is linked to... The XML feed, however, only shows the UNIQUE journal entry id (a five digit number--the same number you see in every entry's permlink). I can't figure out any way to figure out how the jitemid and unique journal entry id correstpond, so even if I could get PHP to send the correct sessionid back to, the comment data I got back would be pretty much useless...

any ideas?

  • 302: lj_dev

    In the interests of consolidating all LiveJournal development-related discussion, we're going to be closing down this community. The same…

  • Plain text to LJ

    I have an old blog from xanga that's in html/plain text and I want to move it over here. Which client would be the best to do this? I also want to…

  • ljKlient 0.2.0 Preview Release 1

    Today marks another milestone in the development of ljKlient — as the first preview of the 0.2 series is released.  Please go to the project…

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened