andrewducker: (Default)
[personal profile] andrewducker
This week's project was to get started on a program that would let me retrieve friends group information from the LJ servers and display it in the way that I want to (wait and see).

Having not doen any stuff with winsock in a couple of years (and nothing intensive then) and never having dealt with HTTP in the slightest, this was a bit of a challenge.  However I've now got it posting the following (only with my password/username) and getting back a positive response. 

POST /interface/flat HTTP/1.0
Host: www.livejournal.com
Content-type: application/x-www-form-urlencoded
Content-length: 34

mode=login&user=test&password=test

Would have taken me far, far less time, only I started off trying to use Microsoft's Internet control, which theoretically would make things much simpler, unless of course you wanted to do things different to how Microsoft wanted you to.....

Now I've got stage 1 working I want to switch across to using encrypted passwords and then the XML interface.  And _then_ wrap it all up in a nice DLL that I can give away to anyone that wants to do their own front end.

Date: 2004-06-06 08:16 am (UTC)
From: [identity profile] deadprogrammer.livejournal.com
I had a very similar experience recently. I hate controls.

Date: 2004-06-06 04:00 pm (UTC)
From: [identity profile] cx650.livejournal.com
"Would have taken me far, far less time, only I started off trying to use Microsoft's Internet control"

I thought you knew better!

Re: Programming fun

Date: 2004-06-07 02:18 am (UTC)
From: [identity profile] wolfieboy.livejournal.com
If you wanted to use Perl, I could help you quite a bit but I suspect that's not the direction that you're heading.

Note that if you get up to the point where you are getting a session key to retrieve things like comments and such then after you have the session key, you have to send it back as a cookie to LJ in the HTTP request with the cookie contents being 'ljsession='.

Re: Programming fun

Date: 2004-06-10 04:20 am (UTC)
From: [identity profile] wolfieboy.livejournal.com
I've tried using VBA at one point and it hurt too much.

You can write actual DLLs in VB these days? I wrote a C DLL for VB back in VB 3 days but haven't kept up with it since then.

March 2026

S M T W T F S
1 2 3 4567
891011121314
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 5th, 2026 03:52 am
Powered by Dreamwidth Studios