jong ik wil de id en titel tag uit de trurbotracker trekken.
maar nu werkt mijn code niet kan iemand vertellen wat ik fout doe.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| $page = file("turbotracker.dsp");
$page = implode("", $page);
preg_match_all("/<titel\>(.+?)<\/titel\>\s+<id\>(.+?)<\/id\>/i",
$page, $news, PREG_PATTERN_ORDER);
$i = 0;
while(list(,$match) = each($news[1]))
{
$url[$i] = "http://www.tweakers.net/nieuws/$news[2][$i]";
$match = str_replace('&','&',$match);
$match = str_replace('<','<',$match);
$match = str_replace('>','>',$match);
$match = str_replace('<i>','',$match);
$match = str_replace('</i>','',$match);
echo $page;
echo $match;
$title[$i] = $match;
++$i;
} |
hij werkt wel bij slashdot met wat annpassingjes.