Just nu i M3-nätverket
Gå till innehåll

Rss-Fel


moztwanted

Rekommendera Poster

Ett ogiltigt tecken påträffades i textinnehållet.

Line: 31 Character: 8

 

Hej!

 

Körde din feed genom W3C:s validator, http://validator.w3.org/feed/, och den hittar konstiga tecken precis efter en del tags. Testa själv genom att kika här: http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fpowergambler.net%2Ffi%2Fpages%2Ftournaments_feed.php%3Flist%3D1

 

Det verkar som att php matar ut någon knasig data, så du får nog se över ditt skript, alternativt posta det här så skall vi försöka hjälpa dig!

 

 

.dune.

----------------------------------------------

- "I find this a nice feature but it is not according to the documentation.

Or is it a BUG?"

- "Let´s call it an accidental feature. :-)"

 

Länk till kommentar
Dela på andra webbplatser

[log]?php

// init xml

header("Content-type: application/rss+xml");

// ISO-8859-1

// iso-8859-1

// utf-8

// US-ASCII

echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n";

echo "<rss version=\"2.0\" xmlns:jf=\"http://www.jivesoftware.com/xmlns/jiveforums/rss\">\n";

echo "<channel>\n";

 

// init php

ini_set("memory_limit", "100M");

include('../includes/commonfunctions.php');

include('../db/db.php');

include('../includes/xmltree.php');

include('../../utils/image_handling/image_handler.php');

include("tournaments/tournaments.php");

 

 

// init lists

$starting = array();

$freerolls = array();

 

// read tournaments....

$the_list = $HTTP_GET_VARS['list']; /* 0 = all, 1 = starting, 2 = freerolls */

 

$tmts = new tournaments();

if ($the_list==1 || $the_list==0) $starting = $tmts->filter_by_start((time()+600), "<", 10);

if ($the_list==2 || $the_list==0) $freerolls = $tmts->filter_freerolls(10);

 

/*

$level1 = array(); // bonus high, ask tobbe....

$level2 = array(); // bonus medium, ask tobbe....

$level3 = array(); // bonus low/easy, ask tobbe....

 

echo "<br>starting: " . count($starting);

echo "<br>freerolls: " . count($freerolls);

echo "<br>level1: " . count($level1);

echo "<br>level2: " . count($leve2);

echo "<br>level3: " . count($level3);

*/

 

// little helper function

function tournament_out($t) {

 

$title = str_replace("&", "\&", $t->title);

// $title = $t->title;

 

$uri = str_replace(" ", "", $title) . "_" . $t->starttime_int . "_" . $t->site->title;

 

echo "<item>\n";

echo "<title>". $title ."</title>\n";

echo "<link>http://powergambler.net/fi</link>\n";'>http://powergambler.net/fi</link>\n";

echo "<guid isPermaLink=\"false\">".$uri."</guid>\n";

echo "<description>\n";

echo $t->limit . " " . $t->game . " tournament " . $title . " starting at " . $t->starttime;

echo "</description>\n";

echo "<jf:creationDate>" . time() . "</jf:creationDate>\n";

echo "<jf:modificationDate>" . time() . "</jf:modificationDate>\n";

echo "</item>\n";

}

 

$main_title = "POWERGAMBLER.net - Turnaukset";

$main_descr = "All tournaments";

if ($the_list == 1) {

$main_title = "POWERGAMBLER.net - Starting tournaments";

$main_descr = "Alkavat turnaukset";

}

if ($the_list == 2) {

$main_title = "POWERGAMBLER.net - Freerolls";

$main_descr = "Ilmaisturnaukset";

}

 

 

 

// produce output...

echo "<title>" . $main_title . "</title>\n";

echo "<link>http://powergambler.net/fi</link>\n";

echo "<description>" . $main_descr . "</description>\n";

echo "<language>fi</language>\n";

 

while (list($key, $tt) = each($starting)) {

if (is_array($tt)) {

foreach($tt as $t) {

tournament_out($t);

}

} else {

tournament_out($tt);

}

}

while (list($key, $tt) = each($freerolls)) {

if (is_array($tt)) {

foreach($tt as $t) {

tournament_out($t);

}

} else {

tournament_out($tt);

}

}

 

echo "</channel>\n";

echo "</rss>\n\n";

 

?>

[/log]

[inlägget ändrat 2006-09-14 18:55:24 av moztwanted]

Länk till kommentar
Dela på andra webbplatser

Arkiverat

Det här ämnet är nu arkiverat och är stängt för ytterligare svar.

×
×
  • Skapa nytt...