Results 1 to 5 of 5

Thread: WebServer Basics ?

  1. #1
    Join Date
    May 2009
    Posts
    2

    Default WebServer Basics ?

    Hi all,

    I'm new to girder (G5), and i'm trying to control my MediaCenter PC using my small UMPC (through WiFi) using the TriggerEvent method.

    I'm able to send events, and control all softwares, from any computer using the web server...
    Now i'd like to get some status values on these web pages (ie: a feedback of current volume, name of current window, etc), but i can't find a clue on how to start...

    Can anyone provide a minimal way to display some values on these web pages ???

    Thx a lot !

  2. #2
    Join Date
    May 2009
    Location
    Vero Beach, Florida
    Posts
    28

    Default

    I was also looking for a method if anyone knows a better way:

    I came up with a workaround for now--

    1) Have girder output the variable to a text file
    2) Make the text file an AJAX/html include on the page
    3) have a refresh button that triggers a girder event to dump the variables to their files, and refreshes them on the page.


    I use this method to display server logs through the girder website, and a variable here or there. It works but can be very tedious to setup.

  3. #3
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    You should take a look at the examples - the basic trick is to use webserverrint() inside a pair of <% %> tags.

    See the Web Programming reference in the help.
    --Rob

  4. #4
    Join Date
    May 2009
    Posts
    2

    Default

    Hi ddxfish & Rob H ...

    Thx for answering.

    ddxfish > I also had this idea, but it's too complicated if i wanna do that on 200 values...

    Rob H > Thx for the advice ! I'll look at this ... server scripting seems easy, but Girder class architecture is still obscure to me. I'll have a look to the API reference and try to understand better. (... and if i need more advices i'll be back )

    /***** HOURS LATER ******/
    OK, that's it ! I found the way !
    What a good advice you gave Rob !
    I only use TriggerEvent to send orders and _G globals variables to get values ! and it works great !

    THX a lot !
    Last edited by psy4meuh; May 29th, 2009 at 07:36 AM.

  5. #5
    Join Date
    May 2004
    Location
    Cardigan, UK
    Posts
    9,278

    Default

    Glad to be able to help.
    --Rob

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •