View Single Post
Old 2008-05-22, 06:31   Link #83
Fahd
* >/dev/null
 
 
Join Date: Aug 2007
Location: Surrey, UK
Age: 39
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.

Last edited by Fahd; 2009-01-10 at 21:23. Reason: Correction
Fahd is offline   Reply With Quote