Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Capturing data on client machine from a ASP page.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Applications Internet
Divers
Thread ID:
00384415
Message ID:
00384499
Vues:
60
Mark,

I was going to wait until tomorrow to check it out but when I saw this post I just cut and pasted it to the command window and it is EXACTLY what I need. It seems to bypass a browse window altogeather letting me do whatever I want with the returned HTML. Fantastic. I really, really appreciate this.

Ed

>I checked, and this worked in the VFP command window:
>
>oInet=CreateObject("InetCtls.Inet.1")
>oInet.RequestTimeOut=20
>oInet.Url = "http://quote.yahoo.com/"
>cHTML = oInet.OpenURL()
>?cHTML
>
>>Mark,
>>
>>Thanks. I'll look into this. I'm not familiar with CScript.exe so it will be interesting to look into this. Your code looks pretty straight forward so it should be easy to play around with. I learn something new every day.
>>
>>Thanks again.
>>
>>Ed
>>
>>>Take a look at the control called MSINET.OCX It's probably already registered on your machine.
>>>
>>>I think this will do what you want. Below is a simple VBscript example. This can be a nice way to automatic web-centric operations because you can execute the VBScript using Window's shell utility CScript.EXE, and you can queue this to happen with Window's built-in task-scheduling capabilities. I think you can also use this control from within VFP. Note that the OpenURL method returns the content of the fetched page. Just save this snippet as mySnippet.vbs, change the URL to something meaningful to you, then at the DOS command prompt enter: CSCRIPT mySnippet.vbs
>>>
>>>Dim Inet
>>>' MSINET.OCX is referenced as "InetCtls.Inet.1"
>>>Set Inet = CreateObject("InetCtls.Inet.1")
>>>Inet.RequestTimeOut=20
>>>Inet.Url = "http://TheSiteIWant.COM/ThePageIWant.HTM"
>>>s = Inet.OpenURL
>>>WScript.Echo "Return Value: " & S
>>>Set Inet=Nothing
>>>
>>>>Is there any way to programatically capture the data that is being displayed in a browser? I have a function that sends an address, city, state, and zipcode to a Post Office cgi script which sends back the corrected and standardised address plus the Carrier Route and zip+4 information. I want to capture that corrected data and be able to put it into a table. If I manually click on "View Page Source" I can see the returned information in the currently viewable WEB page but I have done a search to find that information on the hard drive (hopeing it was cached somewhere) but without any luck.
>>>>
>>>>The function is being run through the browser function of Compiled HTML Help (I guess that is the hhctrl.ocx control but I don't know) so at least that part will be consistant for all users.
>>>>
>>>>Any ideas or leads would be appreciated.
>>>>
>>>>Ed
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform