Keywords:
Question:
I need to know how to fill in form on webpage I need to log into the following Yahoo login page:http://login.yahoo.com/config/login?.intl=us&.src=ygrp&.done=http://groups.yahoo.com%2Fgroup%2Fbrainm%2Fmessage%2F4001Answer:
Hmmm. Ok, what you seem to be doing is trying to pre-stage a Browser window for a real user.And the window has some awful Javascript on it. I recommend OLE to control MSIE. For an example see...
http://techsupt.windowware.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/OLE~ADO~CDO~ADSI~LDAP/OLE~with~IE+Automate~Input~into~Form~with~IE4.txtAnd a user posted the following:Here's some code from a Yahoo Groups application I've written.
AddExtender("WWINT34i.DLL") host="login.yahoo.com" mainurl="/config/login" ;Technically, you should ask for the username and password login="myyahooid" PW_password="mypassword" ;Format form data. First define the formdata variable as a null string formdata="" ;Then add the required form fields one value=pair at a time. ;All these extra formdata are fields that are not required, but used on the Yahoo Groups login form ;formdata=iContentUrl(formdata,".src","ygrp") ;formdata=iContentUrl(formdata,".tries","1") ;formdata=iContentUrl(formdata,".last","") ;formdata=iContentUrl(formdata,"promo","") ;formdata=iContentUrl(formdata,".bypass","") ;formdata=iContentUrl(formdata,".partner","") ;formdata=iContentUrl(formdata,".v","0") ;formdata=iContentUrl(formdata,".emailCode","") ;formdata=iContentUrl(formdata,"hasMsgr","") ;formdata=iContentUrl(formdata,".chkP","Y") ;formdata=iContentUrl(formdata,".intl","us") ;formdata=iContentUrl(formdata,".done","http://groups.yahoo.com/mygroups/") formdata=iContentUrl(formdata,"login",login) formdata=iContentUrl(formdata,"passwd",PW_password) ;formdata=iContentUrl(formdata,".persistent","y") formdata=iContentUrl(formdata,".save","Sign In") tophandle=iBegin(0,"","") connecthandle=iHostConnect(tophandle, host, @HTTPS, "", "") datahandle=iHttpInit(connecthandle,"POST",mainurl,"", 0) rslt = iHttpOpen(datahandle, 0, formdata, -1) if rslt!=200 headers=iHttpHeaders(datahandle) AskItemList("Login Result=%rslt%",headers,@tab,@unsorted,@single) endif xx=iReadDataBuf(datahandle,bufaddr,20000) InvalidPwd = BinaryIndexEx(outbuf, 0, "Invalid Password", @FWDSCAN,0) If InvalidPwd > 0 Then Message("Invalid Password","You entered the wrong password for this account. %@crlf%Please reenter your password on the Preferences screen.") FileClose(loghandle) EndIf DoesNotExist=BinaryIndexEx(outbuf, 0, "does not exist", @FWDSCAN,0) If DoesNotExist > 0 Then Message("The Yahoo ID does not exist","You entered a Yahoo ID that does not exist. %@crlf%Please reenter your Yahoo ID on the Preferences screen.") FileClose(loghandle) EndIf
Article ID: W15100