Ik wil graag wat nieuws berichten op m''n site. Via http://nu.nl/deeplink_html kun je die krijgen, maar hoe krijg ik die in m''n site?
Om de 15 min worden de links ge-update
Om de 15 min worden de links ge-update
Verwijderd
Verwijderd
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
| <font color=#3366CC face=Arial size=3><B>Nieuws</B></font>
<BR>
<BR>
<font face=Arial size=2>
<?PHP
$file = fopen("http://www.ilse.nl","r");
$test=FALSE;
if (!$file) {
echo "<B>Fout op de pagina</B>";
exit;
}
while (!feof($file)) {
$line = fgets($file, 3000);
if (eregi("<span id=news1" , $line)) {$test = TRUE;}; //begin zoeken
if (eregi("</span>" , $line)) {$test = FALSE;}; //einde zoeken
if ($test == TRUE){
$line = stripslashes($line);
$line = eregi_replace( "position:absolute;", "", $line );
$line = eregi_replace( "visibility:hidden;", "", $line );
$line = eregi_replace( "» ", "<li>", $line );
$line = eregi_replace( "<BR>", "", $line );
echo $line;
}}
fclose($file);
?>
</span>
</font> |
Verwijderd
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
| <? $nieuws = file("http://nu.nl/deeplink_html"); $nieuws = join("", $nieuws); $nieuws = str_replace ("<b>", "<BR>", $nieuws); $nieuws = str_replace ("</b>", "<BR>\r", $nieuws); $nieuws = str_replace ("<DIV>", "", $nieuws); $nieuws = str_replace ("</DIV>", "", $nieuws); $nieuws = str_replace ("<UL>", "", $nieuws); $nieuws = str_replace ("</UL>", "", $nieuws); $nieuws = str_replace ("<LI>", "", $nieuws); $nieuws = str_replace("</LI>", "\r", $nieuws); $nieuws = str_replace("nieuws.hoofd", "", $nieuws); $nieuws = str_replace("nieuws.overig", "", $nieuws); $nieuws = str_replace("economie.hoofd", "", $nieuws); $nieuws = str_replace("economie.overig", "", $nieuws); $nieuws = str_replace("net.hoofd", "", $nieuws); $nieuws = str_replace("net.overig", "", $nieuws); $nieuws = str_replace("sport.hoofd", "", $nieuws); $nieuws = str_replace("sport.overig", "", $nieuws); $nieuwsRegel = explode("\r", $nieuws); for ($a=1;$a<=5;$a++) { if ("$nieuwsRegel[$a]" != "") echo "$nieuwsRegel[$a]<br>"; } ?> |
Verwijderd
met [ php ]Op dinsdag 03 april 2001 21:34 schreef jeroenbeekman het volgende:
Hee, bedankt man!
''t werkt. Dit is gaaf zeg.
Nu moet je me alleen nog ff vertellen hoe ik php in dit forum kan posten... Dus je weet wel ''met die kleurtjes''
jeroen.
Verwijderd
Verwijderd
Verwijderd
Hi,Op woensdag 04 april 2001 01:00 schreef deur het volgende:
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 <? $nieuws = file("http://nu.nl/deeplink_html"); $nieuws = join("", $nieuws); $nieuws = str_replace ("<b>", "<BR>", $nieuws); $nieuws = str_replace ("</b>", "<BR>\r", $nieuws); $nieuws = str_replace ("<DIV>", "", $nieuws); $nieuws = str_replace ("</DIV>", "", $nieuws); $nieuws = str_replace ("<UL>", "", $nieuws); $nieuws = str_replace ("</UL>", "", $nieuws); $nieuws = str_replace ("<LI>", "", $nieuws); $nieuws = str_replace("</LI>", "\r", $nieuws); $nieuws = str_replace("nieuws.hoofd", "", $nieuws); $nieuws = str_replace("nieuws.overig", "", $nieuws); $nieuws = str_replace("economie.hoofd", "", $nieuws); $nieuws = str_replace("economie.overig", "", $nieuws); $nieuws = str_replace("net.hoofd", "", $nieuws); $nieuws = str_replace("net.overig", "", $nieuws); $nieuws = str_replace("sport.hoofd", "", $nieuws); $nieuws = str_replace("sport.overig", "", $nieuws); $nieuwsRegel = explode("\r", $nieuws); for ($a=1;$a<=5;$a++) { if ("$nieuwsRegel[$a]" != "") echo "$nieuwsRegel[$a]<br>"; } ?>
Doet iets met Cloud (MS/IBM)
Dit topic is gesloten.
![]()