Page 1 of 1

how do i get text from a web page?

Posted: Sat Feb 15, 2014 7:26 am
by Steve Denney
Hi, I've made a php page that lists the contents of a dir on our server.
I'd like to get the text (list of files) that appears if you open that page in a browser.
I don't want to open the page with the user's browser. I just need the directory contents.
Get url works with text files but not this.
I could make php write the list to a text file and get that with livecode but I'm hoping there's an easier way.

Any help much appreciated

Re: how do i get text from a web page?

Posted: Sat Feb 15, 2014 12:57 pm
by Klaus
Hi Steve,

well, that's a one liner:
...
put url "http://www.your_server.com/name_of_web_page.php" into fld "listing"
...
:D


Best

Klaus

Re: how do i get text from a web page?

Posted: Sun Feb 16, 2014 1:45 am
by Steve Denney
Yeah but Klaus it didn't work :(
The put/get variable is empty but the page in the browser shows the files.
I'll try again later on today...
Thanks

Re: how do i get text from a web page?

Posted: Sun Feb 16, 2014 2:13 am
by Simon
Hi Steve,
make sure you include the "http://..."
If you can view the results via a browser then this should work for you.

Simon

Re: how do i get text from a web page?

Posted: Sun Feb 16, 2014 6:36 am
by Steve Denney
Thanks again Klaus. And Simon. You're right. It's working.
Ok here's my perfect hindsight theory... sat evening (heavy usage period) my satellite internet times out (or I don't give it enough time before I lose patience).
Cheers!
Steve