mirror of
https://github.com/rwinkhart/backtone.git
synced 2026-08-27 20:36:32 -04:00
14 lines
427 B
PHP
14 lines
427 B
PHP
<?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($cacheFile) . " 2>&1 &");
|
|
?>
|