Posted by: Jan
« on: October 25, 2017, 09:42:58 pm »The P132 and P332 RDS encoders also contain a stand-alone HTTP client so the RDS content can be driven by external PHP or ASP file.
Here's an example for scheduling RT1 text messages:
1) Save this file on any HTTP server with PHP support:
2) In the Magic RDS, select Tools - Show command console, or in the embedded website, select Tools - Terminal
3) Type on separate lines:
(Replace the file path and file name by real details)
This is a complete "set-up and forget" procedure. From now the RDS encoder checks for actual text each 60 seconds.
Here's an example for scheduling RT1 text messages:
1) Save this file on any HTTP server with PHP support:
Code: [Select]
<?php
function time_str() {
$dow = date('D');
$hm = (int)date("Gi"); // Time in HHMM format
if ($dow == 'Sat' || $dow == 'Sun') {
// weekend
return 'Lorem ipsum 1';
} else {
// Monday to Friday
if ($hm >= 0 && $hm < 800) return 'Lorem ipsum 2'; //0:00 to 8:00 etc...
if ($hm >= 800 && $hm < 1100) return 'Lorem ipsum 3';
if ($hm >= 1100 && $hm < 1400) return 'Rush Now on NewsTalk KZRG';
if ($hm >= 1400 && $hm < 2130) return 'Lorem ipsum 4';
if ($hm >= 2130 && $hm < 2359) return 'Lorem ipsum 5';
}
}
echo 'RT1=' . time_str();
?>
2) In the Magic RDS, select Tools - Show command console, or in the embedded website, select Tools - Terminal
3) Type on separate lines:
Code: [Select]
READWEB=60,,http://yourserver.com/thefile.php
*READWEB
(Replace the file path and file name by real details)
This is a complete "set-up and forget" procedure. From now the RDS encoder checks for actual text each 60 seconds.