I’m trying to log into a website which authenticates via email and password. Here’s the start of the web app and how I successfully read the headers:
Dim socket1 As New HTTPSocket
Dim result As String
' Request login screen
Dim ih as InternetHeaders = (socket1.GetHeaders("http://v2.gedmatch.com/login1.php", 0))
I’m now having difficulty into how I have to give the cookie which is in one of the headers back to the website when I do the POST command to login. I can get the count for my “ih” with “ih.Count” but as it’s not a dictionary I can’t read out the single key/value pairs. Can someone tell me how you have done this part?
I’m having difficulty in between these two pieces of code, how can I get from having the header information in “ih” (which has a dictionary called …Headers in there apparently with 9 entries) and transform it in the right way to use the Join(Array(cookie1, cookie2) which is a construct I don’t understand either, maybe someone can point out to me what lines I’m missing in between.
My code continues with this:
Dim form As New Dictionary
form.Value("email") = "my_email"
form.Value("password") = "my_password"
result = socket1.Post("http://v2.gedmatch.com/login2.php", 30) // Synchronous
When I read the “result” then it says “Error 53: Not logged in” which I think is due to the fact that I’m not giving the cookie back with my POST command. Is this how it’s done right with a website that needs authorization? Do I have to give any other headers back to website with the POST command?
I’ve searched the forum and while there are bits and pieces everywhere, there is no forum entry explaining it to a newbie like me in it’s entirety.
You must have misunderstood me, @Greg O’Lone . I don’t want to bypass the login screen, I’m a paying user on this website but I want to automate a couple of tasks and better keep track of the response over time.
@Matthew Combatti , thanks for your advice and comment. My actions are those that a user is usually doing. Actually the web app will bring requests down as currently I’ll accidentally do actions again (that I did some weeks or days ago) as there is no way to track which result I already worked on (and they show 1500 matches), so impossible to keep track without a database keeping track.
Best solution would be an API, I hope they will eventually publish one.