Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Download text file from website
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00941665
Message ID:
00950166
Views:
18
Hi David
GotReadURL to work, thanks.
It stopped returning the text file yesterday. Found out later it was my fault. (I forgot that file names on the Web site are Case sensitive. .)
So in the meantime I was debugging the ReadURL routine and it stopped executing the ReadURL.prg. It's like the Cursor was read only. I broke the command in two, saving ReadURL to a variable and it worked fine. (See the code below). This work-around works for me, but am curious. Any idea what caused the replace command to not execute the ReadURL.prg?
Bill

LOCAL lcText
lcText = ""
lcText = ReadURL("http://www.FOOD.com/FOOD.txt")
STRTOFILE(lcText, lcTextFile, 0)

*!* CREATE CURSOR xtemp (mtemp m)
*!* replace mtemp WITH ReadURL("http://www.FOOD.com/FOOD.txt")
*!* COPY MEMO mtemp TO (lcTextFile)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform