|
-
Dec 4th, 1999, 05:36 PM
#1
Thread Starter
New Member
Hi:
I'm trying to automate the daily downloading of data from a website that I conventionally get into by entering a userID then a password then hitting Enter (or clicking on the button).
I can't figure how to automate the entry of the userID into the field on the starting page, then the password, then hitting enter.
Can you help me figure this out, please? Once I'm in there, I want to pull the page down into my PC and extract certain data to add into a database in my PC.
Thx - Geoffrey Daniel
-
Dec 4th, 1999, 06:42 PM
#2
Addicted Member
Is the page an ASP page or an HTML page posting to a CGI script?
------------------
"To the glory of God!"
-
Dec 5th, 1999, 02:36 AM
#3
Addicted Member
OK. ASP stands for Active Server Pages (find more at www.activeserverpages.com) and CGI stands for Common Gateway Interface. When writing a CGI script people mainly use a language called Perl (www.perl.com)
Anyway, it looks to me like you can use VB to execute the url that you gave me. I would suggest using the Inet control (see www.vbsquare.com/internet/):
b() = Inet1.OpenURL("https://www.retirelink.com/wconnect/wc.dll?DataServer~Checklogin~LOGIN~home.asp", icByteArray)
This sets the byte variable b to the output content of the url. To get readable results from b, do this:
For intCount = 0 To UBound(b)-1
strData = strData & Chr(b(intCount))
next
strData will now contain the output that you would see in your browser (well, it gives the source code of the output page)
------------------
"To the glory of God!"
-
Dec 5th, 1999, 03:19 AM
#4
Thread Starter
New Member
Yes, and thanks, but how do I get through the UserName and Password steps first?
-
Dec 5th, 1999, 04:05 AM
#5
Addicted Member
From your description it would appear that it is an HTML form (although I can't get through with the link you gave me). The problem with HTML forms is that they submit to CGI scripts which reads variables that were passed from the HTML page in the form of the values you inputted to the text boxes etc.
What you need to do first is to goto the login page in your browser, view the source and look at the <input> tags. Make a note of their names, and the use the following to post data to the script:
b() = Inet1.OpenUrl("http://www.myurl.com/myscript.dll?userid=myuserid&password=mypassword", icByteArray)
Now use the code I gave earlier to get the response from the web site.
------------------
"To the glory of God!"
-
Dec 5th, 1999, 12:58 PM
#6
Thread Starter
New Member
I don't know what as ASP is, but I believe it's an HTML page. As for CGI, I don't know how I would know what technology the site is using for this particular page. In case it helps - perhaps you could take a look at it, it's "https://www.retirelink.com/wconnect/wc.dll?DataServer~Checklogin~LOGIN~home.asp"
Wow - must be an asp (whatever that is!).
- Geoffrey
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|