PHP Schnipsel

News Heise

Dieses Script gibt die aktuellen News von Heise aus.

Drucken
  1.  <?php   
  2.     
  3.  print <span class="text2"  
  4.  <table align="center" border="0">;   
  5.     
  6.  $fcontents join('',file  
  7.  'http://www.heise.de/newsticker/heise.rdf'));   
  8.     
  9.  $fcontents str_replace("</item>",""  
  10.  $fcontents);   
  11.  $fcontents str_replace("</link>",""  
  12.  $fcontents);   
  13.     
  14.  $splices explode("<item>",$fcontents);   
  15.     
  16.  for ($i 1$i count($splices); $i++) {   
  17.   $link explode("<link>",$splices[$i]);   
  18.   $link[1] = strip_tags($link[1]);   
  19.   $headline str_replace("<title>",    
  20.   "<a href=\"".trim($link[1])."\"   
  21.   target="_blank\"   
  22.   class="heiseheadline\">"$splices[$i]);   
  23.   $headline str_replace("</title>","</a>"  
  24.   $headline);   
  25.   $headline explode ("<link>",$headline);   
  26.   $headline $headline[0];   
  27.   print '<tr><td> $headline</td></tr>'  
  28.    
  29.   print '</table></span>'  
  30.     
  31.  ?>    


Autor: Hendrik Walter




T: 34979 G: 7 H: 10 T: +4 O: 5