|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Its rough and ready but it works! - I run through a proxy server so ca not access the .rdf directly - you may have to ask your ISP to cache a copy of the rdf for you.
<html><title></title> <body bgcolor="#ffffff"> <table width=780 border=0> <?php $file = fopen("http://www.devshed.com/devshednews.rdf", "r"); //open file for reading $rf = fread($file, 32000); // read 32K $grab = eregi("<item>(.*)</item>", $rf, $printing); $pieces = explode("<item>", $printing[0]); $count=count($pieces); for($x=1;$x<=$count-1;$x++){ ereg("<title>(.*)</title>",$pieces[$x],$title ); ereg("<link>(.*)</link>",$pieces[$x],$links ); ereg("<description>(.*)</description>",$pieces[$x],$desc ); ?> <tr><td><H1><?php echo $title[1];?></H1></td></tr> <tr><td><h3><?php echo $desc[1];?>,</h3></td></tr> <tr><td><a href="<?php echo $links[1];?>">Click here for the full story</a>(<?php echo $links[1];?> )</td></tr> <?php } ?> </table> </body> </html> Simon Wheeler. ------------------ Simon Wheeler FirePages -DHTML/PHP/MySQL |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XML Parser for devshednews.rdf |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|