2

I am suppose to retrieve data from a website ( example http://intimes.eu.pn/getsurvey.php ) How should i start ? guideline please

z--
  • 2,186
  • 17
  • 33
  • Your question is too broad, and there aren't enough details. You linked to a json response, but are you trying to consume an API or query a database? If database, what kind? What language are you using? We need as many details as possible. – AgmLauncher Jul 23 '13 at 08:43
  • I do not think that we need to know the database type. The only thing necessary is a URL which produces a JSON answer. So the question is -- how go out from LiveCode to get an answer from an URL which is JSON and then process it in LiveCode. – z-- Jul 23 '13 at 13:12

2 Answers2

2

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

R Ghosh
  • 612
  • 1
  • 4
  • 9
1

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?

Community
  • 1
  • 1
z--
  • 2,186
  • 17
  • 33