Question

How I can log in to this site using native methods? http://forum.soundarea.org/index.php?/forum/1121-01-2013/

My intention is to log in in background (I mean without openning the webbrowser interface or showing the page) to store the page sourcecode.

I tried to log in using this: http://MyUser:MyPass@forum.soundarea.blabla

Tried using POST but I can't:

http://forum.soundarea.org/index.php?&ips_username=MyUser&ips_password=MyPass

http://forum.soundarea.org/index.php?app=core&module=global&section=login&ips_username=MyUser&ips_password=MyPass

(I think I used the correct ids for this site but I'm not sure)

Also tried using WGet application but it can't log in to that url.

I don't tried anything in .NET because I don't have any info about which methods I can use or something else to start trying it because first of all I don't know which protocol requires (http login or post php or other) i'm not an expert about this things.

Please if someone can give me info or examples, and to tell me which is my fault.

Was it helpful?

Solution

I suggest you use HttpRequest to emulate the login progress,use HttpResponse to get webserver response and content and use global CookieContainer to store the cookies.

When you get login successful message,you can use other HttpRequest with global CookieContainer to get any web pages you want download or access.

you can use Httpwatch(www.httpwatch.com) to watch how Internet Explorer exchange data with WebServer.you can also use IE9 devloper tools to do this(press F12 in IE9).

In this case.

1.You should GET http://forum.soundarea.org/index.php?app=core&module=global&section=login page's source code.You will see

ipb.vars['secure_hash']         = '880ea6a14ea49e853634fbdc5015a024';

880ea6a14ea49e853634fbdc5015a024 is secure_hash.

2.Post to http://forum.soundarea.org/index.php?app=core&module=global&section=login&do=process Page. Use this parameter:

auth_key=880ea6a14ea49e853634fbdc5015a024&ips_username=test&ips_password=pass&rememberMe=1

and get the cookie.

3 . Get any page you want with this cookie.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top