Results 1 to 21 of 21

Thread: wanna help in Webbrowser

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    wanna help in Webbrowser

    i make a new project to broswe my site
    so i know that code will make me visit the site

    WebBrowser1.Navigate "www.mysite.com/index.php"

    so know i am in my site login page so i wanna send the username and the pass through Webbrowser

    someone tell me like that

    WebBrowser1.Document.Name = "loginname"
    WebBrowser1.Document.pass = "password"

    so my index.php use Post Method so i wanna send it like post when it is login show me this in the WebBrowser controler

    Soooo the question is how to send every variable via WebBrowser
    with method Post Or Get and retrive data in WebBrowser controler
    thx for your help

  2. #2
    Frenzied Member longwolf's Avatar
    Join Date
    Oct 2002
    Posts
    1,343

    Re: wanna help in Webbrowser

    Hi and welcome to the forum!
    That has been answered here many times.
    Use Search to look for "Webbrowser Login"

  3. #3
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: wanna help in Webbrowser

    VB Code:
    1. WebBrowser1.Document.All("Name").Value = "loginname"
    2. WebBrowser1.Document.All("pass").Value = "password"

    BTW - Welcome to the forums

  4. #4

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    thx brother for your fast answer and i use the code and it is work but i have problem how to make it submit so when i press the buttom take the user and pass and then submit it
    thx again for your help

  5. #5
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: wanna help in Webbrowser

    VB Code:
    1. WebBrowser1.Document.getElementById("Submit").Click 'submit

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    <body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onLoad="document.getElementById('loginUsername').focus(); getPage();">
    <table width="683" height="900" border="0" cellpadding="0" cellspacing="0" align="center" style="border-left: 1px solid #d9d9d9; border-right: 1px solid #d9d9d9;">
    <tr>
    <td width="683" height="50" align="center" valign="middle" style="padding-top: 0px;">
    <form name='logon' method='post' action="e.php" style="margin: 0px; padding: 0px;">username:
    <input type="text" name="name" value="" style="height: 19px;" id="loginUsername" size="20"> &nbsp; &nbsp; password:
    <input type="password" name="pass" value="" style="height: 19px;" size="20"> &nbsp; &nbsp; <input type="image" src="/images/login_button.gif" style="border: 0px;" align="absmiddle"></form>
    </td>


    as you can see to submit this form we must click on pic as you can see in this lines

    <input type="image" src="/images/login_button.gif" style="border: 0px;" align="absmiddle">
    so how can i click it and so sorry to make you suffer with me

  7. #7
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: wanna help in Webbrowser

    try
    VB Code:
    1. WebBrowser1.Document.Forms("logon").submit 'submit

  8. #8

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    AwwwWWw
    thx brother i do not know what i must say to you :$
    you are so helper so kind thx again

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    Hi again
    sorry to ask alot
    so if i have a java script check like that


    function check_request(var_check_img)
    {
    put('<form name="check" method="post">');
    put(' <DIV align="center">');
    put(' Anti-scripting check:<BR>');
    put(' Enter the numbers corresponding with the characters and words in the field<BR>');
    put(' <IMG src="' + var_check_img + '" border=1 bordercolor="#000000">&nbsp;&nbsp;&nbsp;');
    put(' <INPUT class="text" name="requestCheck" type="text" style="width: 50px" maxlength="3">');
    put(' <INPUT class="btn" type="submit" value="ok">');
    put(' </DIV>');
    put('</form>');

    setTimeout('intIsElementInFocus = true; document.check.requestCheck.focus()', 1);
    }


    and when i get index.php source code i found this


    <SCRIPT language="javascript">
    check_request('/ascc.php?81222');
    </SCRIPT>

    or

    <SCRIPT language="javascript">
    check_request('/ascc.php?58620');
    </SCRIPT>

    Evry time it is change this number after ascc.php?
    and when i make my link like that
    www.mysite.com/ascc.php?58620


    it is Give me number on a pic
    like that



    So the question is how can i retrive this number in a variable and how to grab it
    i know that i can send it like that
    WebBrowser1.Document.All("requestCheck").Value = number that i will grab it
    WebBrowser1.Document.Forms("check").submit

    but i wanna know how to get this or grab it
    thx

  10. #10
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: wanna help in Webbrowser

    Do think that would be possible because that is an image and you cant grab numbers from an image.
    My usual boring signature: Something

  11. #11

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    NoNo brother cos that is a fuction that genrat this number So it is possiable to grab it
    but i do not know how
    someone make it but never wanna told me
    and i try bu t untill know i do not have any clue
    and as you can see it is php scripe and out put is puting in this pig so i wanna grab the variable that put it
    cos if i open the link www.mysite.com/ascc.php?81222
    the pic will come blank without any number
    Last edited by pppppp; Jan 3rd, 2007 at 04:21 PM.

  12. #12
    WiggleWiggle dclamp's Avatar
    Join Date
    Aug 2006
    Posts
    3,527

    Re: wanna help in Webbrowser

    Quote Originally Posted by pppppp
    NoNo brother cos that is a fuction that genrat this number So it is possiable to grab it
    but i do not know how
    someone make it but never wanna told me
    and i try bu t untill know i do not have any clue
    and as you can see it is php scripe and out put is puting in this pig so i wanna grab the variable that put it
    cos if i open the link www.mysite.com/ascc.php?81222
    the pic will come blank without any number
    Well it is obviously hashed so that you cannot do that.
    My usual boring signature: Something

  13. #13
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: wanna help in Webbrowser

    It is possible to do but requires WAY WAY more technical knowhow than you have, I am sure. I've played about with OCR (optical character recognition) of images in my programming of stuff for online games and it is a lot of work. One thing to watch for is to see if the rotation of the words in question are ever different...if they're always at the SAME angle it is a simpler matter to build a database of patterns to look for and check for them, but if the angles differ it can be a lot more work :-)

    And no, I won't help with making something to do it...firstly, it's bypassing security and is against the TOS here and secondly it's just TOO much work :-P
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  14. #14

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    Thx all brothers for your Care
    But i have Question
    Look at this Code and answer me plz


    function requestForm() {
    if(document.getElementById('requestCheckElement').value == ""){
    alert('Don\'t forget to fill in the anti-scripting check.');
    return false;
    }
    }

    function crimes_header()
    {
    put('<div style="display: none;">You\'ll have to wait a little longer before commiting crimes again.</div>');

    put('<FORM name="crimes" method="POST" onSubmit="return requestForm();">');
    put(' <TABLE width="90%" border="0" cellpadding="0" cellspacing="1" align="center">');
    put(' <TR>');
    put(' <TH class="top" colspan="8">crimes</TH>');
    put(' </TR>');
    put(' <TR>');
    put(' <TH class="center" width="5">&nbsp;</TH>');
    put(' <TH class="center">crime</TH>');
    //put(' <TH class="center" width="5">&nbsp;</TH>');
    //put(' <TH class="center">lrn</TH>');
    //put(' <TH class="center">pts</TH>');
    put(' <TH class="center" width="5">&nbsp;</TH>');
    put(' <TH class="center">off</TH>');
    put(' <TH class="center">def</TH>');
    put(' <TH class="center">stl</TH>');
    put(' <TH class="center" width="5">&nbsp;</TH>');
    put(' <TH class="center">do</TH>');
    put(' </TR>');
    }

    function crime(var_title, var_learn, var_points, var_offense, var_defense, var_stealth, var_value)
    {
    put('<TR>');
    put(' <TH class="center" width="5">&nbsp;</TH>');
    put(' <TD width="70%">' + var_title + '</TD>');
    //put(' <TH class="center" width="5">&nbsp;</TH>');
    //put(' <TD width="5%">' + var_learn + '%</TD>');
    //put(' <TD width="5%">' + var_points + '%</TD>');
    put(' <TH class="center" width="5">&nbsp;</TH>');
    put(' <TD width="5%">' + var_offense + '%</TD>');
    put(' <TD width="5%">' + var_defense + '%</TD>');
    put(' <TD width="5%">' + var_stealth + '%</TD>');
    put(' <TH class="center" width="5">&nbsp;</TH>');
    put(' <TH align="center" class="center" width="5%"><INPUT type="radio" name="crime" value="' + var_value + '"></TH>');
    put('</TR>');
    }

    function crimes_footer(var_check_img)
    {
    setTimeout("showCrimeImage('"+var_check_img+"')", 10);
    put(' <TR style="display: none;">');
    put(' <TH colspan="8" class="center" align="center" valign="middle">');
    put(' Anti-scripting check (fill in the number): ');
    put(' <IMG src="images/1px.gif" id="asccImg" src="/asccc.php" border="1" bordercolor="#000000" align="absmiddle">&nbsp;&nbsp;&nbsp;');
    put(' <INPUT class="text" name="requestCheck" type="text" id="_requestCheckElement" style="width: 50px" maxlength="3">');
    put(' </TH>');
    put(' </TR>');
    put(' <TR>');
    put(' <TH colspan="8" class="center" align="center" valign="middle">');
    put(' Anti-scripting check (fill in the number): ');
    put(' <IMG src="images/1px.gif" id="ascccImg" border="1" bordercolor="#000000" align="absmiddle">&nbsp;&nbsp;&nbsp;');
    put(' <INPUT class="text" name="requestCheck" type="text" id="requestCheckElement" style="width: 50px" maxlength="3">');
    put(' </TH>');
    put(' </TR>');
    put(' <TR>');
    put(' <TH height="15" class="bottom" colspan="8"><INPUT class="button" type="submit" value=" OK "></TH>');
    put(' </TR>');
    put(' </TABLE>');
    put('</FORM>');
    }




    ok that is the Code if i wanna send the value of Radio in that code

    <INPUT type="radio" name="crime" value="' + var_value + '">


    i know that the Values from 0 to 9
    So how can i send it ??
    i try

    WebBrowser1.Document.All("crime").Value = 0
    WebBrowser1.Document.getElementById("crime").Value=0


    and never work
    so how can i sent it ??
    i know that i can send by this
    WebBrowser1.Document.Forms("crimes").submit
    but i wanna send the value of Radio too
    Last edited by pppppp; Jan 7th, 2007 at 11:30 AM.

  15. #15

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    anyone plz help me in this

  16. #16
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: wanna help in Webbrowser

    If we wanted (or could) help we would...if people don't answer you and you badger them into doing so they tend to remember your name and forget ever helping you again...

    ...just as I did when you badgered me about the image stuff via private message
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  17. #17
    PowerPoster lintz's Avatar
    Join Date
    Mar 2003
    Location
    The 19th Hole
    Posts
    2,697

    Re: wanna help in Webbrowser

    Option Buttons need to be "checked".

    Try this.

    VB Code:
    1. WebBrowser1.Document.All("crime").Checked = True

  18. #18

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    Quote Originally Posted by smUX
    If we wanted (or could) help we would...if people don't answer you and you badger them into doing so they tend to remember your name and forget ever helping you again...

    ...just as I did when you badgered me about the image stuff via private message
    Oh thx smUX about wize
    but really i don 't wont to badger but i wanna explain something to you i am sure that you was in it one day
    Look bro as you know when some one Need something and he search in Everywhere
    ( and he have not expriance enough like me) so he wanna ask when he Found a great Good Fourm like that ok
    and i think that Everyone in here have experiance he had it form here and another place so if he Faile to Get it from outside so he ask Everywhere and Everyone (espcialy when you Give me Hint that you know something about it ) so i wana to know from the one that show me that he know that is all
    anyway thx For Explain and i will take it after that

    about lintz


    Thx So much about hel you are really helping me
    i Do not know what i will Do if you never help me
    thx both brother
    i Forget to ask brother
    radio have a Value from 0 to 9
    i wannna select the value of this radio 0 Fro example i try this but it is tell me
    run time Error '438'
    object Dosent support this property or method
    in this Code
    WebBrowser1.Document.All("crime").Checked.value=0
    WebBrowser1.Document.All("crime").Value(0) = True
    WebBrowser1.Document.getElementsByName("crime")(0).innerText = "0"
    WebBrowser1.Document.getElementsByName("crime").value=0
    WebBrowser1.Document.Forms("crimes").All("crime").Value = 0
    WebBrowser1.Document.Forms("crimes").All("crime").Value(0).Checked = True
    and in the Code that you give it to me
    am i right or what is thw right Code??
    so what is the Solve
    thx For your help
    Last edited by pppppp; Jan 9th, 2007 at 02:18 AM.

  19. #19

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    Thx all brother i Found it No need o answer thx For all my Bro that help me
    and other too (K)

  20. #20
    PowerPoster
    Join Date
    May 2006
    Location
    Location, location!
    Posts
    2,673

    Re: wanna help in Webbrowser

    Quote Originally Posted by pppppp
    and i think that Everyone in here have experiance he had it form here and another place so if he Faile to Get it from outside so he ask Everywhere and Everyone (espcialy when you Give me Hint that you know something about it ) so i wana to know from the one that show me that he know that is all
    However, you failed to note the LAST line of my original post..."And no, I won't help with making something to do it...firstly, it's bypassing security and is against the TOS here and secondly it's just TOO much work :-P"...this means I am not interested in helping you with the problem, mostly because it's against the rules here
    Well, everyone else has been doing it :-)
    Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
    Expect more to come in future
    If I have helped you, RATE ME! :-)

    I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!

    And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.

  21. #21

    Thread Starter
    Junior Member
    Join Date
    Jan 2007
    Posts
    16

    Re: wanna help in Webbrowser

    Ok brother No problem Everythings ganna be Alrihgt
    and Really Nice To meet you (F)

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