>Tariq,
>
>Have you received anything on this yet? Let me know if you do. I too am looking into do something like this in the very near future. Different sort of site but the concept of pulling data from the internet.
It's actually very easy, and Tariq already got help from me on his problem, in another forum. The steps are:
1. Read the html from the website into a variable
2. Use alines() to create an array, one element per html line
3. Scan the array for identifiers before and after what you want t extract
4. Use Strextract() to extract the value you want, using the identifiers from 3.
Here's a very simple program to get the html:
function geturldata
lparameters tlURL
lcReturn = ''
if !empty(tlURL)
loWinHttp = CreateObject("WinHttp.WinHttpRequest.5.1")
loWinHttp.Open('GET',tlURL,.F.)
loWinHttp.send()
lcReturn = loWinHttp.ResponseText
Endif
return lcReturn
To get this into an array:
lcUrl = 'http://www.yourwebsite.com/'
lcHtml = geturldata(lcUrl)
lnLines = alines(laHtmlline,lcHtml)
Now you can use ascan() to scan for whatever you want. Or you can create a cursor and "append from array laHtmlline", if you prefer to work with cursors.