1. --!movie
  2. --!encoding=utf-8
  3.  
  4. global $
  5.  
  6. ----------------------------------------
  7. -- Send data with http get (synchronous or blocking mode)
  8. ----------------------------------------
  9. on startMovie
  10.     _player.debugPlaybackEnabled = 1
  11.  
  12.     -- libs
  13.     $.import("curl")
  14.  
  15.     -- get a CURL handle (xtra instance)
  16.     ch = $.curl.init()
  17.  
  18.     -- specify options
  19.     ch.setOption($.curl.CURLOPT.URL, "http://valentin.dasdeck.com/xtras/curl_xtra/.test/echo.php?foo=äöü&bar=hello%20world")
  20.  
  21.     -- 0=return error code (=default), 1=return data
  22.     res = ch.exec(1)
  23.  
  24.     if integerP(res) then
  25.         put "ERROR:" && curl_error(res)
  26.     else
  27.         put "RESULT:" && res.readRawString(res.length)
  28. --      put "SPEED_DOWNLOAD:" && ch.getInfo($.curl.CURLINFO.SPEED_DOWNLOAD)
  29. --      put "TOTAL_TIME:" && ch.getInfo($.curl.CURLINFO.TOTAL_TIME)
  30.     end if
  31. end
  32.  
[raw code]