How to read an www adress and gather infos from there???  
Author Message
Misiacik7





PostPosted: Visual FoxPro General, How to read an www adress and gather infos from there??? Top

Hi

My question looks simple I hope... I want to read an adress for example I have adress http://www.hide-link.com/ and I want to export the text from this site and import it into my table... Is there a way how to do so Please give me a sample code... And I forgot something... I want to have an automatic and real time in my program... Is there a way how to gather the exact time from the internet But the main task is the url reading and expotring.

Thanks a lot...



Visual FoxPro1  
 
 
CetinBasoz





PostPosted: Visual FoxPro General, How to read an www adress and gather infos from there??? Top

lcUrl = "http://www.test.com/default.htm"
lcLocalFile = "myLocalFile.htm"
if ( getFileFromURL(m.lcURL,m.lcLocalFile) = 0 )
"Downloaded".
endif

Procedure getFileFromURL
Lparameters tcRemoteFile,tcLocalFile
Declare Integer URLDownloadToFile In urlmon.Dll;
INTEGER pCaller, String szURL, String szFileName,;
INTEGER dwReserved, Integer lpfnCB
RETURN URLDownloadToFile(0, m.tcRemoteFile, m.tcLocalFile, 0, 0)


 
 
CetinBasoz





PostPosted: Visual FoxPro General, How to read an www adress and gather infos from there??? Top

I see that this is related with another question of yours and you should decided to forget the methods suggested (web services). Well you shouldn't forget about web services. It looks like it's a better option for your need.


 
 
Misiacik7





PostPosted: Visual FoxPro General, How to read an www adress and gather infos from there??? Top

This would be great if I want to download whole site on the disk... But I want to import some text from the site to my table... is there code to do that

for example, somthing like that : append from and type and i dont know xls or something like that.... I hope you understand.... :(

Thanks for an advice... :)