Many thanks for the PHP script Danj. Just a couple of suggestions though:
1)
$release->torrent->direct on this line:
Code:
echo "<link>" . $release->torrent->direct . "</link>\n";
should have
htmlspecialchars wrapped around (as shown below), as otherwise URL's with ampersands in them cause problems.
Code:
echo "<link>" . htmlspecialchars($release->torrent->direct) . "</link>\n";
2) I replaced
$release->version == $vidver on this line:
Code:
if ((isset($vidver) && ($release->version == $vidver)) || (!isset($vidver))) {
with a
preg_match:
Code:
if ((isset($vidver) && ( preg_match("#" . $vidver . "#i", $release->version) )) || (!isset($vidver))) {
in case a group releases a second version, which shows up as:
h264 v2 for example.