Note that this Wiki is a work in progress, items may not be updated or may disappear entirely as the pages are updated.

HTML Output Examples

From SpacialAudio

Jump to: navigation, search

HTML output pages can be created in various ways inside SAM Broadcaster. This section walks through three quick examples showcasing each type.

Note: This section does not cover websites generated exclusively via a webscripting language like PHP or ASP. This only concerns only HTML pages as parsed and generated via SAM.

Examples

1. Input source type: File

Create a file called input_file.txt and enter the following for its contents:

Currently playing:
$song.artist$ - $song.title$ ($song.mmss$)

Now go to the HTML output configuration section and add a new HTML output file with input_file.txt as the input source with type File and output as output_file.txt.

2. Input source type: HTTP

Inside the HTML output configuration add a new output page of type HTTP with input source:

http://www.spacialaudio.com/help/input_http.php?artist=#artist#&title=#title#&mmss=#mmss#

and output called output_http.txt.

Note: This page is generated on our webserver using song information SAM sends inside the GET URL parameters. The source for this PHP script is as follows:

<?php echo "Currently playing:"; ?>
<?php echo "$artist - $title ($mmss)"; ?>

3. Input source type: PAL Script

Finally, create a file called input_pal.txt and use the following for its contents:

<% Send('Currently playing:'); %>
<%= cursong['artist'] %> - <%= cursong['title'] %> (<%= cursong['mmss'] %>)

Next, inside the HTML output configuration , add a new output page of type PAL script with input file input_pal.txt and output output_pal.txt.

Note: Notice that this special kind of PAL script mixes normal HTML with PAL script commands. All PAL script commands need to be within <% %> brackets.

Generate the example pages

From the General menu command generate the HTML output page and look at the output files created.

The same page was just created in three different ways!

Personal tools