Mijn Probleem
Ik wil een php scriptje informatie van een pagina in een XML (WAP pagina) laten schrijven, alleen ik krijg een Parse error van de server door de XML header, Iemand een idee hoe ik dit kan oplossen?
Ik wil een php scriptje informatie van een pagina in een XML (WAP pagina) laten schrijven, alleen ik krijg een Parse error van de server door de XML header, Iemand een idee hoe ik dit kan oplossen?
PHP:
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
| <?php $username = "leerling"; $password = "zomer"; $file = "http://".$username.':'.$password."@www.gymnasiumbeekvliet.nl/hypertext/FMPro?-DB=Roosterwijzigingen.fp5&-Format=roosterwijzigingen.htm&-Lay=Formulier_web&Web_ja|nee=Ja&-SortField=Datum&-SortOrder=ascend&-SortField=Omschrijving&-SortOrder=ascend&-SortField=Roosterklassen::Klas&-SortOrder=ascend&-Error=fout.htm&-Find"; if($pagina = @file($file)){ $stuk =""; foreach($pagina as $stuk){ $totaal .= $stuk; } //$totaal = str_replace('width="90"', 'width="120"', $totaal); $totaal = explode('<H1>Roosterwijzigingen</H1>', $totaal); //Gooit de header er uit $totaal = str_replace('<TD></TD><TD width="90"><I> ', '<TD></TD><TD>', $totaal); //Gooit stukje onnodig er uit $totaal = str_replace('</I>', '', $totaal); $totaal = str_replace('<TD width="90"><I> </TD>', '' , $totaal); //Gooit de breedte er uit $totaal = str_replace('<TD></TD>', '' , $totaal); //Gooit de onnodige tab er uit $totaal = str_replace('</TD>', '<TD></TR>' , $totaal); //Zet alles netjes onder elkaar $totaal = str_replace('</TR></TR>', '</TR>' , $totaal); //Maakt van 2xTR -> 1xTR $totaal = str_replace('<br>', '' , $totaal); //Verwijderd <br> $totaal = str_replace('<TD colspan="3">', '<TR valign="top"><TD>' , $totaal); //zet gebeurtenis onder de rest $totaal = str_replace('<TR><TD><BR><TD></TR>', '' , $totaal); //Verwijderd onnodige regel $totaal = str_replace('</BODY>', '' , $totaal); //Verwijderd dubbele Body sluittag $totaal = str_replace('</HTML>', '' , $totaal); //Verwijderd dubbele HTML sluittag $totaal = str_replace('<TR valign="top">', '<TR>' , $totaal); //verwijderd de TR speficatie $totaal = str_replace(' ', '' , $totaal); //verwijderd onnodige tabs $totaal = str_replace('<TABLE cellspacing="0" cellpadding="0">', '<table>' , $totaal); $totaal = ''.$totaal[1]; }else{ $totaal = "Sorry, maar de site van Gymnasium Beekvliet is momenteel niet werkende, dus zul je helaas even geduld moeten hebben"; } ?> <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card title="Tabel"><p> <?php echo($totaal); ?> </p></card> </wml> |