Skip to Content
DocumentationDynamic Files

Dynamic Files

Note

Since August 2016, a Client-Id is required to send request. The examples on this page don’t demonstrate that

Signature

NameContent/Outputs
Filenamethe name of the file that will be generated in the ~/DynamicTextFiles folder
Paththe path to request the content from
Content/Responsethe response from the path
Typethe type of response you expect, ether Text or an Image
Statusreport updates, completed, failed statuses

Examples

Text Type

  • A file that we will call Game
  • Type = Text
  • A game_direct.php file that is on a server with the next contents. In this case we will add an extra value ?channel=XXX to the path. Where XXX will be the channel name you want the data from.
<?php $channel = $_GET['channel']; $data = json_decode( @file_get_contents( 'https://api.twitch.tv/kraken/channels/' . $channel ), true ); $game = $data['game']; if( $game != null ) { echo $game; // echo "Game: " . $game; } else { echo " "; } ?>

Example 1

Response:

Response

Image Type

  • A file that we will call ImageName
  • Type = Image
  • A myimage.php file that is on a server with the next contents
<?php echo "https://ttv-backgroundart.s3.amazonaws.com/404_backgroundart.jpg"; ?>

Example 1

Response:

Response

Specific notes

  • Files can be any http:// or https:// call, as long as it returns text or an image link
  • Possibilities are endless and up to you, since this module acts as a plugin hoster to write text- and image files for you