Hi
I'm still in the darkages using Delphi 5 for solving personal problems.
I'm a bit dumb about aspects of the object orinted programming.
My problem is that I don't know how to use Delphi 5 to access the registered user webpages that the racingpost supply.
I would like to know how send the racingpost my username and password from delphi using the NMHTTP component or any other method of connecting to retrieve the webpage I am after and not the 'you must register' web page I fetch.
Thanks in advance(from one going potty searhing the web for an answer)
Marcus.
Comments
: I'm still in the darkages using Delphi 5 for solving personal problems.
: I'm a bit dumb about aspects of the object orinted programming.
:
: My problem is that I don't know how to use Delphi 5 to access the registered user webpages that the racingpost supply.
:
: I would like to know how send the racingpost my username and password from delphi using the NMHTTP component or any other method of connecting to retrieve the webpage I am after and not the 'you must register' web page I fetch.
:
: Thanks in advance(from one going potty searhing the web for an answer)
:
: Marcus.
:
I would advice not to use NMHTTP for this, because it will send your password in plain-text. You can better use the TWebBrowser to go to racingpost. This way you need to enter the password yourself, but it is send using the normal encryption of that site. Your program can "watch over your shoulder by using this code in the OnDocumentComplete() event:
[code]
SomeString := IHTMLElement(IHTMLDocument2([blue]WebBrowser1[/blue].Document).body).innerHTML
[/code]
Replace the blue part with the name of your TWebBrowser control. You must also add the MSHTML unit to the uses list. The body of the webpage is now copied into SomeString, and can be parsed by the program to get the info you need.
and IHTMLDocument2 come from. At this point I am not sure the Delphi 5 WebBrowser will allow me to enter a racingpost username and password as the entry points seem to be generated diferently to the standard Html some Javascript Code perhaps. Will take some time to create a test to see where it leads.
---Your reply
I would advice not to use NMHTTP for this, because it will send your password in plain-text. You can better use the TWebBrowser to go to racingpost. This way you need to enter the password yourself, but it is send using the normal encryption of that site. Your program can "watch over your shoulder by using this code in the OnDocumentComplete() event:
: [code]
: SomeString := IHTMLElement(IHTMLDocument2([blue]WebBrowser1[/blue].Document).body).innerHTML
: [/code]
: Replace the blue part with the name of your TWebBrowser control. You must also add the MSHTML unit to the uses list. The body of the webpage is now copied into SomeString, and can be parsed by the program to get the info you need.
:
: and IHTMLDocument2 come from. At this point I am not sure the Delphi 5 WebBrowser will allow me to enter a racingpost username and password as the entry points seem to be generated diferently to the standard Html some Javascript Code perhaps. Will take some time to create a test to see where it leads.
:
:
: ---Your reply
: I would advice not to use NMHTTP for this, because it will send your password in plain-text. You can better use the TWebBrowser to go to racingpost. This way you need to enter the password yourself, but it is send using the normal encryption of that site. Your program can "watch over your shoulder by using this code in the OnDocumentComplete() event:
: : [code]
: : SomeString := IHTMLElement(IHTMLDocument2([blue]WebBrowser1[/blue].Document).body).innerHTML
: : [/code]
: : Replace the blue part with the name of your TWebBrowser control. You must also add the MSHTML unit to the uses list. The body of the webpage is now copied into SomeString, and can be parsed by the program to get the info you need.
: :
:
:
The TWebBrowser is an interface to the IE, so in many ways it will react as IE does. Those two interfaces are defined in the MSHTML unit. This must be added manually to the uses list.
Simple for some and difficult for me.
Many Many thanks
May sound a bit over the top but been struggling for sometime on this.