Controlling Ie 6.0 From A Program - Has anybody tried anything like this

free web hosting
Free Web Hosting > Computers & Tech > Programming > Programming General > Algorithms (Languageless)

Controlling Ie 6.0 From A Program - Has anybody tried anything like this

mitchellmckain
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.

Reply

tansqrx
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.

 

 

 


Reply

mitchellmckain
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.

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:


Searching Video's for controlling, 6, 0, program
advertisement




Controlling Ie 6.0 From A Program - Has anybody tried anything like this



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE