1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
|
$nFo_url = "www.balbalbal.de/rdf.php";
$nFo_number = 5;
$nFo_show_description = true;
$nFo_file_content = @file_get_contents($nFo_url);
#Items auslesen
$nFo_items = preg_match_all("/<item[ ]?.*>(.*)<\/item>/Uis", $nFo_file_content, $nFo_array_items);
$nFo_array_items = $nFo_array_items[1];
if(!empty($nFo_array_items)) {
for($nFo_n=0;$nFo_n<$nFo_number;$nFo_n++) {
preg_match("/<link>(.*)<\/link>/Uis", $nFo_array_items[$nFo_n], $nFo_array_link);
preg_match("/<title>(.*)<\/title>/Uis", $nFo_array_items[$nFo_n], $nFo_array_title);
$nfo.="<a href=\"$nFo_array_link[1]\" title=\"$nFo_array_title[1]\" target=\"_blank\">$nFo_array_title[1]</a><br>";
echo "";
if(nFo_show_description) {
preg_match("/<description>(.*)<\/description>/i", $nFo_array_items[$nFo_n], $nFo_array_description);
if(!empty($nFo_array_description[1])) {
echo $nFo_array_description[1]."<br>";
}
}
}
}
else {
echo "Sorry! aber du hast hie nix zu suchen grrrrrrrrrrr<br>";
}
|