Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am new to Perl. Is it possible to make a script with SSI, that will play a media file on my local computer, when someone opens my page in their browser? Of course, I know I would need to be online. Thanx!

Edit title by tye

  • Comment on Play media file locally when someone opens my web page ?

Replies are listed 'Best First'.
Re: Homer
by strredwolf (Chaplain) on Nov 04, 2001 at 12:38 UTC
    No, you need to use CGI instead. Otherwize, depending on your web server's config, you'll be sending your CGI script to the client.

    --
    $Stalag99{"URL"}="http://stalag99.keenspace.com";

      Not true at all ... a server-side include can be configured to execute a CGI script with the output being incorporated into the web page (in the same way as if the CGI was executed directly itself - See the <!--#include virtual="" --> SSI directive).

      To perform this bit of functional magic though, there would need to be a network method by which the web server on which the web page is hosted can pass a message to the work-station computer. This could be implemented through any variety of network magic, but I would point Anonymous Monk to a similar piece of code from Lincoln Stein which sends an email to a set address when a web page is hit - This code can be found at here under the heading Send E-Mail When a Particular Page Gets Hit. Although this code example does rely on mod_perl for execution, it could easily be adapted for CGI/SSI execution by simply stripping out the apache handling component and the additional of content header output.

       

      Ooohhh, Rob no beer function well without!