Create a login page for a URL

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
Reply

Join Date: Oct 2008
Posts: 3
Reputation: trojanworm is an unknown quantity at this point 
Solved Threads: 0
trojanworm trojanworm is offline Offline
Newbie Poster

Create a login page for a URL

 
0
  #1
Oct 12th, 2008
hi i have been trying to get this working out i got a login url with two urls actually one to log you in and a java script button.

lets say this is the URL's

http://login.mywebsite/login.nhn?m=login&memberid= (HERE Account)

middle part of url : &password= (password)

The last part i would like put put one more hmtl with it lets call it : &nextURL=http://LOL.mywebsite.com/common/prelaunch.nhn?gameId=crazyness="



what i would like to do is have the public enter account names in one textbox
and password in the next.


For the site im wanting to login with has the account/password in the hmtl itself. i would like to know how i can make ONE button log me in and then go the the next URL


something like http://login.mywebsite.com/login.nhn...eId=crazyness= where the %username% and %pass% is where the information goes in the URL. (this is not the real URL fyi)

Please help me i would gladey appreciate
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Create a login page for a URL

 
0
  #2
Oct 13th, 2008
How far have you got, do you have the 2 boxes and a button yet? Why would you use javascript as the whole next page and password part would be open for someone to either just bypass it or decrypt it and use your page
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3
Reputation: trojanworm is an unknown quantity at this point 
Solved Threads: 0
trojanworm trojanworm is offline Offline
Newbie Poster

Re: Create a login page for a URL

 
0
  #3
Oct 13th, 2008
i was searching of how i could possibly do this i found this that ki nda gave me an idea:
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Text;
  7. using System.Windows.Forms;
  8. using System.Net;
  9. using System.IO;
  10.  
  11. using System.Web;
  12.  
  13. namespace aebot
  14. {
  15. public partial class Form1 : Form
  16. {
  17. public Form1()
  18. {
  19. InitializeComponent();
  20. }
  21.  
  22. private void btnGo_Click(object sender, EventArgs e)
  23. {
  24. string url = "http://website/a.aspx";
  25. if (tbRegio.Text.Length > 0)
  26. {
  27. url += tbRegio.Text;
  28. }
  29. lblUrl.Text = url;
  30. //url = "http://login.ijji.com/login.nhn?m=login&memberid=";
  31. rtbHtml.Text = getHtml(url,"email@example.com","secret");
  32.  
  33. }
  34.  
  35.  
  36.  
  37. private string getHtml(string url,string username,string password)
  38. {
  39. HttpWebRequest request;
  40. HttpWebResponse response;
  41. CookieContainer cookies = new CookieContainer();
  42. WebClient client = new WebClient();
  43. HttpUtility hu = new HttpUtility();
  44. string parameters = string.Format("email={0}&pass={1}",
  45. HttpUtility.UrlEncode(username),
  46. HttpUtility.UrlEncode(password));
  47. return HttpPost("http://website/login.aspx?href=%22/a.aspx"
  48. ,parameters);
  49.  
  50. /*client.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.2; .NET CLR 1.0.3705;)");
  51.  
  52. request = (HttpWebRequest)WebRequest.Create(url);
  53. request.AllowAutoRedirect = false;
  54. request.CookieContainer = cookies;
  55. response = (HttpWebResponse)request.GetResponse();
  56. string s = "niks gevonden";
  57. using (Stream data = response.GetResponseStream())
  58. {
  59. StreamReader sr = new StreamReader(data);
  60. s = sr.ReadToEnd();
  61. sr.Close();
  62. data.Close();
  63. }
  64. return s;
  65. * */
  66. }
  67.  
  68. private string HttpPost(string URI, string Parameters)
  69. {
  70. System.Net.WebRequest req = System.Net.WebRequest.Create(URI);
  71. //req.Proxy = new System.Net.WebProxy(ProxyString, true);
  72.  
  73. req.ContentType = "application/x-www-form-urlencoded";
  74. req.Method = "POST";
  75.  
  76.  
  77. byte[] bytes = System.Text.Encoding.ASCII.GetBytes(Parameters);
  78. req.ContentLength = bytes.Length;
  79.  
  80. System.IO.Stream os = req.GetRequestStream();
  81. os.Write(bytes, 0, bytes.Length);
  82. os.Close();
  83.  
  84. System.Net.WebResponse resp = req.GetResponse();
  85. if (resp == null) return null;
  86.  
  87. System.IO.StreamReader sr = new System.IO.StreamReader(resp.GetResponseStream());
  88. return sr.ReadToEnd().Trim();
  89. }
  90. }
  91. }

the point of java script is that it launches an application from my computer files.
Last edited by cscgal; Oct 13th, 2008 at 12:24 pm. Reason: Added code tags
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Create a login page for a URL

 
0
  #4
Oct 13th, 2008
OK, but thats entirely different from what you initially asked. If you wanted to use javascript you'd need to be running a web form, implying aspx, and that you said you wanted to make a login form, so it seems very much like you wanted a web form..

Now you have shown a windows app..

Please define your problem more clearly.
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 3
Reputation: trojanworm is an unknown quantity at this point 
Solved Threads: 0
trojanworm trojanworm is offline Offline
Newbie Poster

Re: Create a login page for a URL

 
0
  #5
Oct 18th, 2008
okay so id be starting wtih web developer? i have a url that loads the java script button and i wanted to add with it its all http urls that i want to compile into a login and then loads the other http for the javascript.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: Create a login page for a URL

 
0
  #6
Oct 18th, 2008
You need to define what you want, for your own sanity and that of anyone whos going to try and help you.

What you wrote is not a definition, its a waffle, with fluff..
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 15,986
Reputation: jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all jbennet is a name known to all 
Solved Threads: 509
Moderator
Featured Poster
jbennet's Avatar
jbennet jbennet is offline Offline
Moderator

Re: Create a login page for a URL

 
0
  #7
Oct 20th, 2008
Reported as spam.
If i am helpful, please give me reputation points.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC