mirror of
https://github.com/rwinkhart/backtone.git
synced 2026-08-28 04:46:54 -04:00
Add unicode interpretation; add example for cached VideoCardz feed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$command = "/usr/local/bin/backtone";
|
||||
$argument = "BASE64ENCODEDINPUTXML";
|
||||
$cacheFile = __DIR__ . "/cache/feed.xml";
|
||||
$tempFile = "/tmp/feed.xml" . ".tmp";
|
||||
|
||||
// serve cached file immediately
|
||||
header("Content-Type: application/xml; charset=utf-8");
|
||||
readfile($cacheFile);
|
||||
|
||||
// trigger background regeneration
|
||||
exec(escapeshellcmd($command) . " " . escapeshellarg($argument) . " > " . escapeshellarg($tempFile) . " 2>&1 && mv " . escapeshellarg($tempFile) . " " . escapeshellarg($cacheFile) . " &");
|
||||
?>
|
||||
Reference in New Issue
Block a user