Results 1 to 16 of 16

Thread: Hel with making get request for registeration

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Arrow Hel with making get request for registeration

    Hi all i got a form that has 3 textbox and one button . The textboxes holds:

    username,password and email. I want to collect these textbox input and make a get request and execute it. But i do not know how to pass the data of textbox to the registeration url shown beleow. The bold parts are data from textboxes.The rest of data in url are static. I be happy if some on help me pass text box data to this url and execut it.Thanks

    VB Code:
    1. http://register.mysite.com/reg/ControllerServlet?RequestId=Register.RegisterPalUser&txt_NickName=[B]Kowareta+Koss+Kadem[/B]&pwd_Psd=[B]worldpeace[/B]&pwd_ConfPsd=[B]worldpeace[/B]&sel_SecretQuestion=1&hid_SecretQuestion=What+is+the+name+of+the+street+you+grew+up%3F&txt_SecretAnswer=ptdnet&sel_Year=1979&txt_FirstName=Qsadasd&txt_LastName=dasd&sel_Sex=1&txt_EmailID=[B][email protected][/B]&txt_EmailConfirm=[B][email protected][/B]&Country=US&txt_Zip=10017&chk_USOffer=Y&chk_Affiliate=Y&strAction=Registration
    Last edited by tony007; Jun 14th, 2006 at 09:49 PM.

  2. #2
    Addicted Member
    Join Date
    Dec 2005
    Posts
    163

    Re: Hel with making get request for registeration

    VB Code:
    1. Dim a, b, c As String
    2.  
    3. a = "http://register.mysite.com/reg/ControllerServlet?RequestId=Register.RegisterPalUser&txt_NickName="
    4. b = "&pwd_Psd="
    5. c = "&pwd_ConfPsd=worldpeace&sel_SecretQuestion=1&hid_SecretQuestion=What+is+the+name+of+the+street+you+grew+up%3F&txt_SecretAnswer=ptdnet&sel_Year=1979&txt_FirstName=Qsadasd&txt_LastName=dasd&sel_Sex=1&txt_EmailID="
    6.  
    7. inet.execute = a & Text1 & b & Text2 & c


    It would go like that (assuming you have a inet control)
    If this post has helped you please rate it by clicking the scales to the left of this post!

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Hel with making get request for registeration

    Quote Originally Posted by trinic
    VB Code:
    1. Dim a, b, c As String
    2.  
    3. a = "http://register.mysite.com/reg/ControllerServlet?RequestId=Register.RegisterPalUser&txt_NickName="
    4. b = "&pwd_Psd="
    5. c = "&pwd_ConfPsd=worldpeace&sel_SecretQuestion=1&hid_SecretQuestion=What+is+the+name+of+the+street+you+grew+up%3F&txt_SecretAnswer=ptdnet&sel_Year=1979&txt_FirstName=Qsadasd&txt_LastName=dasd&sel_Sex=1&txt_EmailID="
    6.  
    7. inet.execute = a & Text1 & b & Text2 & c


    It would go like that (assuming you have a inet control)
    Thank u for u reply. I tried like this and keep getting object required at inet.execute line . the massage box shows all the data corectly but the execut point shows error. I tried both using & and + and i get same error:
    VB Code:
    1. Private Sub Command4_Click()
    2.  
    3.  
    4. Dim var1 As String
    5. var1 = "http://register.mysite.com/reg/ControllerServlet?RequestId=Register.RegisterPalUser&txt_NickName="
    6.  
    7. Dim name As String
    8. name = Text1.Text
    9.  
    10. Dim var2 As String
    11. var2 = "&pwd_Psd="
    12.  
    13. Dim password As String
    14. password = Text2.Text
    15.  
    16. Dim var3 As String
    17. var3 = "&pwd_ConfPsd="
    18.  
    19. Dim passconfirm As String
    20. passconfirm = Text2.Text
    21.  
    22. Dim var4 As String
    23. var4 = "&sel_SecretQuestion=1&hid_SecretQuestion=What+is+the+name+of+the+street+you+grew+up%3F&txt_SecretAnswer=ptdnet&sel_Year=1979&txt_FirstName=Qsadasd&txt_LastName=dasd&sel_Sex=1&txt_EmailID="
    24.  
    25. Dim email As String
    26. email = Text3.Text
    27.  
    28. Dim var5 As String
    29. var5 = "&txt_EmailConfirm="
    30.  
    31. Dim emailconfirm As String
    32. emailconfirm = Text3.Text
    33.  
    34. Dim var6 As String
    35. var6 = "&Country=US&txt_Zip=10017&chk_USOffer=Y&chk_Affiliate=Y&strAction=Registration"
    36.  
    37.  
    38. MsgBox "variables:" + var1 + name + var2 + password + var3 + passconfirm + var4 + email + var5 + emailconfirm + var6
    39.  
    40. 'Inet.Execute = var1 & name & var2 & password & var3 & passconfirm & var4 & email & var5 & emailconfirm & var6
    41. [B]Inet.Execute = var1 + name + var2 + password + var3 + passconfirm + var4 + email + var5 + emailconfirm + var6[/B] ==> error here. object required
    42.  
    43. End Sub

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Hel with making get request for registeration

    Have you referenced the inet control? Added it to your form?
    Last edited by randem; Jun 14th, 2006 at 11:13 PM.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Hel with making get request for registeration

    Quote Originally Posted by randem
    Have you referenced the inet control? Added it to your form?
    i put the inet controle already !! but i keep getting error!!

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Hel with making get request for registeration

    Try placing all your variable into one variable and doing a debug.print to find out just what your variable looks like. Then post it.

    ie.
    VB Code:
    1. somevar = var1 + name + var2 + password + var3 + passconfirm + var4 + email + var5 + emailconfirm + var6
    2.  
    3. debug.print somevar

  7. #7
    Addicted Member
    Join Date
    Dec 2005
    Posts
    163

    Re: Hel with making get request for registeration

    try this...
    VB Code:
    1. WebBrowser1.Navigate2  var1 + name + var2 + password + var3 + passconfirm + var4 + email + var5 + emailconfirm + var6

    replace webbrowser1 with whatever yours is named
    If this post has helped you please rate it by clicking the scales to the left of this post!

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Hel with making get request for registeration

    Quote Originally Posted by randem
    Try placing all your variable into one variable and doing a debug.print to find out just what your variable looks like. Then post it.

    ie.
    VB Code:
    1. somevar = var1 + name + var2 + password + var3 + passconfirm + var4 + email + var5 + emailconfirm + var6
    2.  
    3. debug.print somevar

    It prints the url correctly . the massage box also prints corectly :


    VB Code:
    1. http://register.mysite.com/reg/ControllerServlet?RequestId=Register.RegisterPalUser&txt_NickName=Attila Haramy&pwd_Psd=kingjan&pwd_ConfPsd=kingjan&sel_SecretQuestion=1&hid_SecretQuestion=What+is+the+name+of+the+street+you+grew+up%3F&txt_SecretAnswer=ptdnet&sel_Year=1979&txt_FirstName=Qsadasd&txt_LastName=dasd&sel_Sex=1&[email protected]&[email protected]&Country=US&txt_Zip=10017&chk_USOffer=Y&chk_Affiliate=Y&strAction=Registration

  9. #9
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Hel with making get request for registeration

    Did you try what trinic stated?

  10. #10
    Addicted Member
    Join Date
    Dec 2005
    Posts
    163

    Re: Hel with making get request for registeration

    Use the suggestions I noted above, I've tried it and it works (if i had a valid user/pass) it would work, it took me to the right page but said my site is unavailable.
    If this post has helped you please rate it by clicking the scales to the left of this post!

  11. #11

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Hel with making get request for registeration

    Quote Originally Posted by trinic
    Use the suggestions I noted above, I've tried it and it works (if i had a valid user/pass) it would work, it took me to the right page but said my site is unavailable.
    well it worked but is there away to do this wihtout webbrowser controle?

  12. #12
    Addicted Member
    Join Date
    Dec 2005
    Posts
    163

    Re: Hel with making get request for registeration

    what is it your trying to do? pass it to IE?
    If this post has helped you please rate it by clicking the scales to the left of this post!

  13. #13
    Addicted Member
    Join Date
    Dec 2005
    Posts
    163

    Re: Hel with making get request for registeration

    if it is, you need to do this....


    Place this code at the top of all your coding in your form...

    VB Code:
    1. Option Explicit
    2. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

    then place this code in your button...


    VB Code:
    1. ShellExecute hwnd, "OPEN", var1 + name + var2 + password + var3 + passconfirm + var4 + email + var5 + emailconfirm + var6, "", "", 3
    If this post has helped you please rate it by clicking the scales to the left of this post!

  14. #14
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Hel with making get request for registeration

    Or using MS XML 2.0 .. gets the text also ..
    depends what you want to do ..

    VB Code:
    1. '// REFERENCE Microsoft XML, Version 2.0
    2.  
    3. Private Sub Command1_Click()
    4.     Dim strText As String
    5.     strText = SendRequest("http://www.myurl.com/mypage.asp?usr=me&pass=to")
    6.     If Len(strText) Then
    7.         Debug.Print strText
    8.     End If
    9. End Sub
    10.  
    11. Private Function SendRequest(ByVal strUrl As String) _
    12.     As String
    13.     On Error Resume Next
    14.     Dim objHTTP As New MSXML.XMLHTTPRequest
    15.     objHTTP.Open "GET", strUrl, False
    16.     objHTTP.setRequestHeader "Content-Type", "text/html"
    17.     If Err = 0 Then
    18.         objHTTP.send
    19.         SendRequest = objHTTP.responseText
    20.     End If
    21. End Function

  15. #15

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Hel with making get request for registeration

    Quote Originally Posted by trinic
    Use the suggestions I noted above, I've tried it and it works (if i had a valid user/pass) it would work, it took me to the right page but said my site is unavailable.
    Many thanks for suggestion . could u tell me how to make error checking detect error. For example if some thing was wrong with registeration i usualy get directed to this url not the actual url that holds all the registeration info as i posted above :

    Code:
    http://register.mysite.com/reg/ControllerServlet?RequestId=Register.RegisterUser
    What that happens I want record that username that failed and place it in seperated listbox. could u tell me how i can detect that fail and place that registeration info in to failed listbox?Thanks

  16. #16

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Hel with making get request for registeration

    Quote Originally Posted by trinic
    what is it your trying to do? pass it to IE?
    Thank u for reply. I just want to execute the url and if it refares me to diffrent url then detect and record that registeration info . For example if it failes i want to add that username to failes listbox.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width