Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> Controlling Ie 6.0 From A Program, Has anybody tried anything like this
mitchellmckain
post Sep 22 2005, 12:33 AM
Post #1


Premium Member
Group Icon

Group: [HOSTED]
Posts: 374
Joined: 28-April 05
From: Salt Lake City, Utah
Member No.: 4,500



I mostly program in C++ but I am open to using any language (although would not like to buy a compiler, I have Visual Studio). In the past I know that I have been able to run programs in a sub process although I am not sure that would be the right approach for this. The idea is to run a program that supplies the keystrokes to IE 6.0 in order to get info from that site periodically and analyse it. I think it has to be IE 6.0 because well take a look at the minimum requirement test they do on this site www.wfrmls.com.

Has anyone done anything like this and could they point me in the right direction? I am quite capable of absorbing whatever details are needed from the internet (I learned OpenGL and Windows API in the same way).

P.S. I am not talking about cracking the site or anything. I would use a legitimate user and password.
Go to the top of the page
 
+Quote Post
tansqrx
post Sep 22 2005, 03:47 AM
Post #2


Super Member
Group Icon

Group: [HOSTED]
Posts: 533
Joined: 25-April 05
Member No.: 4,374



mitchellmckain,

I am working on similar project myself. In my case I can not say that I am so innocent, in the way of cracking that is, although my plights are all for research using my own usernames before anyone complains. Well actually I don’t care if anyone complains, I will still do it. On to the story…

I am accessing the Yahoo! login pages and need various information back, such as if the login was successful or not. In the case of Yahoo!, the status of login is given in the HTTP status code at the very beginning of the received packet. I am using Visual Basic.NET 2003 as my programming language. I know that this does not go very well with C++ but I believe for your purposes you might want to look into the .NET suite.

I m not using IE for any data transfer but a built-in data type called “HttpWebRequest”. After the variable is typed a method called Create is issued with the host in it. Then GetResponse actually contacts the server and a response is brought back to the computer. A small sample is given below and is actual code from my project.

CODE
'The object used to define a http request
Dim httpRequest As HttpWebRequest
‘The object that is the response
Dim httpResponse As HttpWebResponse
‘The HttpWebResponse has to be converted into a stream
‘with a certain encoding before it can be read as a string
Dim responseStream As Stream
Dim responseEncoding As Encoding
Dim responseStreamReader As StreamReader
‘The string that will hold the html
Dim strReturnCode As String

Try
‘This is were you put the server information
httpRequest = CType(WebRequest.Create("http://www.google.com"), HttpWebRequest)
‘Go get the response
httpResponse = CType(httpRequest.GetResponse(), HttpWebResponse)
‘I grab the HTTP status here
strReturnCode = httpResponse.StatusCode.ToString
‘Make the response into a string
responseStream = httpResponse.GetResponseStream()
responseEncoding = System.Text.Encoding.GetEncoding("utf-8")
responseStreamReader = New StreamReader(responseStream, responseEncoding)

Catch ex As WebException
MessageBox.Show(ex.Status.ToString)

End Try

‘The stream is finally made into a string
Dim strResponse As String = responseStreamReader.ReadToEnd


This is a very specific example of what you might do. After you receive the string you will have to so some application specific processing on it to get your information out. In my case the HTTP status code is the most important thing so I don’t have to dig into the html. If the page is fairly static then you shouldn’t have that hard of a time parsing the information you are after.

As for using IE for this task I am not sure if it is possible. There may be some Windows COM calls that you can place but I would recommend against it. Making a direct request will give you much more control over your code.

I know that this is not exactly what you are looking for since you are a C++ guy but I hope it helps you a little.
Go to the top of the page
 
+Quote Post
mitchellmckain
post Sep 25 2005, 08:47 PM
Post #3


Premium Member
Group Icon

Group: [HOSTED]
Posts: 374
Joined: 28-April 05
From: Salt Lake City, Utah
Member No.: 4,500



I don't care much about the language, they are all pretty much the same to me. What I am more concerned about is the security and especially their minimum requirement test. I have my doubts about whether this page will fit your "static" requirement. They have those pattern recognition tests designed to block automatic access on some pages. I can avoid these but this is an example of how automatic access unfriendly this website is. Another is thier limit to downloading and analysing less than 100 data records at a time. Also it is not a matter of simply parsing the info. It has to be retrieved interactively in pieces and then put together.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Arithmetical Progression(0)


 



- Lo-Fi Version Time is now: 11th October 2008 - 04:28 AM