Journals and WAP

Jan 22, 2005 17:35


kunzite1 redirected me to lj-dev community, hoping you could help me out with this.

I wanted to give a possibility to our server's users to read journals using WAP-access. So I created S2 style, that outputs WML. Since set_content_type() in S2 makes no sense ( Read more... )

Leave a comment

Comments 9

evan January 22 2005, 10:32:21 UTC
Why not fix your server directly instead of having the intermediate step of the PHP retrieval.

Reply

fxool January 23 2005, 04:08:37 UTC
OK, that would be good.
Could You please explain what do we have to do?

Reply

mart January 23 2005, 05:22:49 UTC

There is a patch in Zilla which makes set_content_type work in S2. It's never been committed to CVS because no-one's bothered to review it, but you could try appying it if you want. Let me know if it breaks. ;)

Perhaps a better way to fix this (rather than having everyone use s2id, which relies on the styleid never changing) would be to just implement a separate WAP mode in Perl and hook it into Apache::LiveJournal::journal_content (or whatever that function is called) based on some aspect of the URL, such as it being like http://wap.yourdomain.com/soandso/, where you must reserve the username “wap” if you support user vanity domains on your installation.

Reply

fxool January 23 2005, 05:35:38 UTC
Gosh!
I'm not so good at this. Guess I'll just have to talk to the main admin about this. It's interesting.
Before that I'll try out Your second advice about "auth=digest". That is closer to me. :)

Thank You, Mart!

Reply


ashley_y January 22 2005, 14:06:02 UTC
Can't you have your PHP send an authentication cookie when it gets the page from LJ?

Reply

fxool January 23 2005, 04:15:15 UTC
Emm.. I don't know, how to do that.
I am familiar with the FLAT interface, but I don't understand how cookies work.
I know that in the header there should be "X-LJ-Auth:", but what next? Where can I get the session ID and all the rest?
I can grab some useful info from here - http://www.livejournal.com/community/lj_dev/668661.html, however it's not all I need to know.

Anyway - thank You already.

Reply

mart January 23 2005, 05:25:08 UTC

If you request a URL like /users/user/?s2id=1234&auth=digest the server will ask the client to do challenge-response digest auth. I don't know whether the HTTP library in PHP supports that, but if it doesn't it hopefully shouldn't be too hard to implement anyway. For one-off requests there's no point in starting an LJ session.

Reply


OLA fernandovichi February 21 2005, 08:51:18 UTC
VC FALA PORTUGUES?

Reply

Re: OLA fxool February 24 2005, 07:11:24 UTC
I'm sorry, I didn't understand You.

Reply


Leave a comment

Up