Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[C#] ItsMods login
#1
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. }
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#2
Fuck yea!
Reply

#3
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: MaEIQ.png]
Reply

#4
[Image: ktduZ.png]
Reply

#5
(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.
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#6
I meant, what happens if you are already logged in
[Image: MaEIQ.png]
Reply

#7
(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
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#8
(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..
[Image: MaEIQ.png]
Reply

#9
(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
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#10
(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 ...
[Image: MaEIQ.png]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  ItsMods Russian Invasion Arteq 39 19,687 09-04-2013, 08:16
Last Post: Arteq
  History of ItsMoDs Bandarigoda123 6 4,294 08-09-2013, 13:33
Last Post: House
  ItsMods E-losev 20 11,210 08-01-2013, 14:18
Last Post: Bandarigoda123
  [Request] Login / Register System? South2AKA 5 5,032 07-17-2013, 13:50
Last Post: surtek
  Help MW3 Admin Rcon login PW guru 6 9,901 07-14-2013, 21:18
Last Post: guru
  [News] JariZ left itsmods kokole 19 9,952 05-16-2013, 17:56
Last Post: Tomsen1410
  Spam bots on ItsMods AZUMIKKEL 10 8,117 05-08-2013, 23:05
Last Post: AZUMIKKEL
  [Request] Addition to the ItsMods rules AZUMIKKEL 5 3,578 04-16-2013, 07:41
Last Post: Arteq
  itsmods Arteq 25 12,700 03-13-2013, 10:04
Last Post: aosma8
  Your itsmods forum username? Rendflex 20 11,167 01-20-2013, 01:58
Last Post: JariZ

Forum Jump:


Users browsing this thread:
4 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.