Leuke XML output?

Gestart doorSjoerd15 reacties101 weergaven

16 berichten · pagina 1 van 2

Sjoerd

Lid · Topicstarter

Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Wat vinden jullie van mijn mooie doe advertenties xml ding ?

http://www.ikbenbob.nl/one2xs/doe_xml.php?user=[je gebruikers naam van one2xs]

voor de mensen die de source willen:

[COLOR= #0000BB]<?[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]] ==[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Location: doe_xml.php?user=sjerdo"[/COLOR][COLOR= #007700]);
}[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/file_get_contents"]file_get_contents[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.one2xs.com/doe_js?wat&user="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]user[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #DD0000]"document.write(one2xs::user_unknown);"[/COLOR][COLOR= #007700]){[/COLOR]
    [URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Location: doe_xml.php?user=sjerdo"[/COLOR][COLOR= #007700]);
}[/COLOR]
[URL="http://www.php.net/header"]header[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Content-type: text/xml"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<?xml version="1.0" encoding="ISO-8859-1" ?>
"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<advertenties>
"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"&euro;"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"€"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/str_replace"]str_replace[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"&aacute;"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"a"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"document.write("[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$contents[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/explode"]explode[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]");"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR]
[URL="http://www.php.net/preg_match_all"]preg_match_all[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/<a href="(.*)" target="_blank">(.*)</a>/iU[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/preg_match_all"]preg_match_all[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]/<em>(.*)</em>/iU[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$contents[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$omschrijving[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<[/COLOR] [URL="http://www.php.net/sizeof"]sizeof[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]]);[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++){[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"	<doe>
"[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"		<url>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</url>
"[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"		<titel>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$advertenties[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]2[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</titel>
"[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"		<omschrijving>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$omschrijving[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700]][[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</omschrijving>
"[/COLOR][COLOR= #007700];[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"	</doe>
"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"</advertenties>
"[/COLOR][COLOR= #007700];[/COLOR]
?>


Om dit te gebruiken kun je ook deze code gebruiken:

[COLOR= #0000BB]<?
$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"sjerdo"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$xml[/COLOR] [COLOR= #007700]=[/COLOR] simplexml_load_file[COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.ikbenbob.nl/one2xs/doe_xml.php?user="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Foutje bij het ophalen..."[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$doe_acties[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$xml[/COLOR][COLOR= #007700]->[/COLOR]doe[COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$random[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$doe_acties[/COLOR][COLOR= #007700]));[/COLOR]

[COLOR= #0000BB]$doe_actie[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$doe_acties[/COLOR][COLOR= #007700][([/COLOR][COLOR= #0000BB]$random[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700])];[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$doe_actie[/COLOR][COLOR= #007700]->[/COLOR]url[COLOR= #007700].[/COLOR][COLOR= #DD0000]"">"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$doe_actie[/COLOR][COLOR= #007700]->[/COLOR]titel[COLOR= #007700].[/COLOR][COLOR= #DD0000]"</a> - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$doe_actie[/COLOR][COLOR= #007700]->[/COLOR]omschrijving[COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
?>


dan moet je wel ff $username naar jouw gebruikersnaam veranderen.
0
Berichten
1.803
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Leuk sjerdo, Zelf gemaakt?
0
Sjoerd

Lid · Topicstarter

Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
ja smilenet een half uurtje geleden ofzo.

ik dacht, waarom alleen javascript
dus toen deed ik er zelf een xml bij =d
0
Berichten
1.803
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Alleen ik snap nog niet helemaal wat het doet yummie
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Waarom html_entity_decode()?
0
Sjoerd

Lid · Topicstarter

Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Anders errort hij =D
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
BIj mij zet ie gwn alle tekst achter elkaar?
Opera 9.nogwat
0
Berichten
93.699
Reputatie
0
Punten
1,27
Lid sinds
Laatst gezien
ik heb gekeken is wel handig
alleen ik gebruikt die frame al
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Sjerdo:
Anders errort hij =D
Nu ook. smile
Je moet die juist weglaten; nu zet hij & weer om naar & en dan geeft ie een error.
0
Sjoerd

Lid · Topicstarter

Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oke, gewijzigd.
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Altijd naar mij luisteren. hypocrite
0
Sjoerd

Lid · Topicstarter

Berichten
13.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Om dit te gebruiken kun je ook deze code gebruiken:

[COLOR= #0000BB]<?
$username[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"sjerdo"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$xml[/COLOR] [COLOR= #007700]=[/COLOR] simplexml_load_file[COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://www.ikbenbob.nl/one2xs/doe_xml.php?user="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$username[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Foutje bij het ophalen..."[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$doe_acties[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$xml[/COLOR][COLOR= #007700]->[/COLOR]doe[COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$random[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/rand"]rand[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700],[/COLOR] [URL="http://www.php.net/count"]count[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$doe_acties[/COLOR][COLOR= #007700]));[/COLOR]

[COLOR= #0000BB]$doe_actie[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$doe_acties[/COLOR][COLOR= #007700][([/COLOR][COLOR= #0000BB]$random[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700])];[/COLOR]

[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=""[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$doe_actie[/COLOR][COLOR= #007700]->[/COLOR]url[COLOR= #007700].[/COLOR][COLOR= #DD0000]"">"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$doe_actie[/COLOR][COLOR= #007700]->[/COLOR]titel[COLOR= #007700].[/COLOR][COLOR= #DD0000]"</a> - "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$doe_actie[/COLOR][COLOR= #007700]->[/COLOR]omschrijving[COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
?>


dan moet je wel ff $username naar jouw gebruikersnaam veranderen.
0
Berichten
1.926
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hij laat alles gewoon als tekst zien!
0
Bas

Lid

Berichten
1.081
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lennard schreef:
Altijd naar mij luisteren. hypocrite
Ik vind het appart dat jij altijd alles goed hebt en wij nooitcry
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
XML-verwerking mislukt: syntaxfout (Regel: 6, Karakter: 39)

Document als HTML verwerken
Fout:well-formedness constraint: entity declared
Specificatie http://www.w3.org/TR/REC-xml/#wf-entdeclared
  3:     <doe>
  4:         <url>http://www.one2xs.com/doe?user=348&amp;id=127</url>
  5:         <titel>OosterlichtArtsFestival</titel>
  6:         <omschrijving>Minimaal 1 kaart kopen &agrave; 6.50 - Gekeurd binnen uiterlijk 24 uur.</omschrijving>
  7:     </doe>
  8:     <doe>
  9:         <url>http://www.one2xs.com/doe?user=348&amp;id=124</url>
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren