问题
I am suppose to retrieve data from a website ( example http://intimes.eu.pn/getsurvey.php ) How should i start ? guideline please
回答1:
Here's how to get started:
//PLACE THE URL FROM WHICH YOU WILL RETRIEVE DATA INTO ANY VARIABLE (tURL)
put "http://intimes.eu.pn/getsurvey.php" into tURL
// RETRIEVE DATA FROM SERVER. PLACE DATA INTO VARIABLE tDATA
put url tURL into tData
// DO SOMETHING WITH tData
To work with JSON within Livecode, you will have to use a library that parse JSON. Investigating this is a start. http://revonline2.runrev.com/stack/82/LibJson-1-0b
回答2:
To start I suggest to read the following chapters of the Users Guide
- 11.4 Working with URLs
- 11.5 Uploading and downloading files
- 11.6 Other Internet commands
Available on MSWindows for example under C:\Program Files\RunRev\LiveCode Community 6.1\Documentation\pdf
And you probably need https://github.com/montegoulding/mergJSON
Related Square brackets with mergJSON in LiveCode - what am I doing wrong?
来源:https://stackoverflow.com/questions/17805326/retrieve-data-from-server