REALbasic Code
I'm stumped. I can't see what I'm doing wrong. My code (in REALbasic) says this:
Which should tell LiveJournal:
But the LiveJournal server just throws "FAIL: no mode set" back at me. What am I doing wrong?
Dim Part1,Part2,Part3,Part4,Part5,Part6,Part 6Length,WriteThis as String
Dim Part6LengthN as Integer
StatusInfo.Text="Connected. Logging In..."
Part6="mode=login&user="+Username.Text+"&password="+UserPass.Text+"&clientversion=MacOS-EasyJournal/1.0.0"+C HR(10)+CHR(13)
Part6LengthN=Len(Part6)
Part6Length=Str(Part6LengthN)
Part1="POST /cgi-bin/log.cgi HTTP/1.0"+CHR(10)+CHR(13)
Part2="Host: www.livejournal.com"+CHR(10)+CHR(13)
Part3="Content-type: application/x-www-form-urlencoded"+CHR(1 0)+CHR(13)
Part4="Content-length: "+Part6Length+CHR(10)+CHR(13)
Part5=CHR(10)+CHR(13)
// Part6 already posted
WriteThis=Part1+Part2+Part3+Part4+Part5+P art6
LoginSocket.Write(WriteThis)Which should tell LiveJournal:
POST /cgi-bin/log.cgi HTTP/1.0
Host: www.livejournal.com
Content-type: application/x-www-form-url-encoded
Content-length: nn
mode=login&user=test&password=test&clientversion=MacOS-EasyJournal/1.0.0But the LiveJournal server just throws "FAIL: no mode set" back at me. What am I doing wrong?
