Results 1 to 17 of 17

Thread: Myspace Login... Tricky headers!

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Sep 2005
    Posts
    540

    Myspace Login... Tricky headers!

    Code:
            TCPClient = New System.Net.Sockets.TcpClient("myspace.com", 80)
            TCPClient.GetStream.BeginRead(readBuffer, 0, BYTES_TO_READ, AddressOf Read_Data, Nothing)
    
            Data_To_Send = "POST http://login.myspace.com/index.cfm?fuseaction=login.process "
            Data_To_Send = Data_To_Send & "&email=" & EmailTxt.Text & "&password=" & PasswordTxt.Text
    
            sw = New IO.StreamWriter(TCPClient.GetStream)
            sw.Write(Data_To_Send)
            sw.Flush()
    I'm tyring to create a program that logins into my myspace and retrieves if i have new comments messages etc etc. I'm using the Winsock namespace as you can tell.
    When i send this data off to myspace i get:

    Code:
    HTTP/1.1 400 Bad Request
    Content-Type: text/html
    Date: Thu, 10 Jan 2008 10:02:26 GMT
    Connection: close
    Content-Length: 20
    
    <h1>Bad Request</h1>

    Sent back to me. Now i know that this is because i'm not sending the correct headers and what not to the myspace server. I've tried catching the packets with a packet sniffer and HTTP Live Headers (With firefox) both returned gibberish. I've looked around for example codes for logging into myspace on these forums, but also, i get the Bad Request error returned to me.

    So i'm hoping someone could help me out with finding out the correct things to send please.



    Also, on another note:

    Code:
    RememberMeChk.Checked = GetSetting("Myspace Checker", "Settings", "Chk Remember Me", 1)
    EmailTxt.Text = My.Settings.EmailText
    Why does My.Settings.EmailText not save when the application is restarted? It will save when i try to read from it before i close the app, but it won't save once the app has been restarted. I also tried saving the text to the registry with the SaveSetting and GetSetting commands. It saves numbers, but they both don't save text. I find this very weird?
    Last edited by Slyke; Jan 10th, 2008 at 05:15 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width