ItsMods

Full Version: [C#] ItsMods login
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
In case you feel like everyone is leeching yo shizz:

CSHARP Code
  1. private bool Login( string User, string Password )
  2. {
  3. System.Collections.Specialized.NameValueCollection Data
  4. = new System.Collections.Specialized.NameValueCollection();
  5. Data.Add( "username", User );
  6. Data.Add( "password", Password );
  7. Data.Add( "submit", "Login" );
  8. Data.Add( "action", "do_login" );
  9.  
  10. WebClient wb = new WebClient();
  11. byte[] bytes = wb.UploadValues( "http://itsmods.com/forum/member.php", "POST", Data );
  12.  
  13. if ( System.Text.Encoding.ASCII.GetString( bytes ).Contains( "successfully" ) )
  14. return true;
  15.  
  16. return false;
  17. }


just use this and people will have to login first Smile

example:
CSHARP Code
  1. if( !Login( textBox1.Text, textBox2.Text ) )
  2. {
  3. System.2012.DestroyTehWorld();
  4. }
Fuck yea!
Does it return something else if the person is already logged in? Because if you use this in a program and it returns false because the user was already logged in it's pretty retarded...
[Image: ktduZ.png]
(02-02-2012, 15:35)Pozzuh Wrote: [ -> ]Does it return something else if the person is already logged in? Because if you use this in a program and it returns false because the user was already logged in it's pretty retarded...

Nope, you can't stay logged in by using this afaik.
I meant, what happens if you are already logged in
(02-02-2012, 19:31)Pozzuh Wrote: [ -> ]I meant, what happens if you are already logged in

You mean like on the website itsself? It doesn't matter
(02-02-2012, 19:58)iAegle Wrote: [ -> ]
(02-02-2012, 19:31)Pozzuh Wrote: [ -> ]I meant, what happens if you are already logged in

You mean like on the website itsself? It doesn't matter

I mean what does the function return..
(02-02-2012, 20:22)Pozzuh Wrote: [ -> ]
(02-02-2012, 19:58)iAegle Wrote: [ -> ]
(02-02-2012, 19:31)Pozzuh Wrote: [ -> ]I meant, what happens if you are already logged in

You mean like on the website itsself? It doesn't matter

I mean what does the function return..

The HTML code of the "Succesfully logged in" redirect page thing Smile
(02-02-2012, 20:27)iAegle Wrote: [ -> ]
(02-02-2012, 20:22)Pozzuh Wrote: [ -> ]
(02-02-2012, 19:58)iAegle Wrote: [ -> ]
(02-02-2012, 19:31)Pozzuh Wrote: [ -> ]I meant, what happens if you are already logged in

You mean like on the website itsself? It doesn't matter

I mean what does the function return..

The HTML code of the "Succesfully logged in" redirect page thing Smile

I mean what does it return if you are already logged in..

God, why does it feel like we always end up in these kind of conversations ...
Pages: 1 2