URL works in IDE, browser but not on Livecode Server

David Bovill david at viral.academy
Wed Aug 5 01:43:16 EDT 2015


The following url works in the browser, in script and in the message box:

   -
   https://commons.wikimedia.org/w/api.php?action=query&titles=Image:Andalusian_horse_moscow.jpg&prop=imageinfo&format=json&iiprop=extmetadata|url

It does not however work when called from a script in Livecode server. It
does work when called by curl on the same server.

This script if run on your Livecode server should demonstrate the
difference:

<?rev
>     put "
> https://commons.wikimedia.org/w/api.php?action=query&titles=File%3AAndalusian_horse_moscow.jpg&prop=imageinfo&format=json&iiprop=extmetadata|url"
> into someUrl
>     put shell ("curl" && quote & someURL & quote) into someResult
>     delete line 1 to 4 of someResult
>     put url someURl & CR & someURL & CR & someResult
> ?>
>

Anyone have an idea why the server may not been doing the same thing as the
IDE or curl with this url?



More information about the Use-livecode mailing list