Your Ad Here

 Navigation
Home
Source code
Tutorials
RSS feeds
Articles
Wordpress plugins
Blog
Books
Software
Downloads
Hosting
manuals
Script directory
Training
Our Links




 Sponsors
 Links
wwwstores
programmershelp
finance products
 Downloads
 Misc
Webmaster Resources
Only PHP
ScriptSearch.com
Scripts.com - Get the best scripts NOW!
AndreaPHP Programming

Valid XHTML 1.0 Transitional


Valid CSS!


Moreover feed

<?php
if( ! ($fp = fopen("http://p.moreover.com/cgi-local/page?c=MP3%20news&o=rss", "r" )) )
die("Couldn't open xml file!");
$item_counter = 0;
$in_item_tag = 0;
$mover_current_tag_state = '';
$mover_headline_data = array();
function startElementHandler( $parser, $element_name, $element_attribs )
{
global $item_counter;
global $in_item_tag;
global $mover_current_tag_state;
global $mover_headline_data;
if( $element_name == "ITEM" )
{
$in_item_tag = 1;
}
if( $in_item_tag == 1 )
{
$mover_current_tag_state = $element_name;
}
else
{
$mover_current_tag_state = '';
}
}
function endElementHandler( $parser, $element_name )
{
global $item_counter;
global $in_item_tag;
global $mover_current_tag_state;
global $mover_headline_data;
$mover_current_tag_state = '';
if( $element_name == "ITEM" )
{
$item_counter++;
$in_item_tag = 0;
}
}
function characterDataHandler( $parser , $data )
{
global $item_counter;
global $in_item_tag;
global $mover_current_tag_state;
global $mover_headline_data;
if( $mover_current_tag_state == '' || $in_item_tag == 0 )
return;
if( $mover_current_tag_state == "TITLE" ) {
$mover_headline_data[$item_counter]["title"] = $data;
}
if( $mover_current_tag_state == "LINK" ) {
$mover_headline_data[$item_counter]["link"] = $data;
}
if( $mover_current_tag_state == "DESCRIPTION" ) {
$mover_headline_data[$item_counter]["description"] = $data;
}
}
if( !($xml_parser = xml_parser_create()) )
die("Couldn't create XML parser!");

xml_set_element_handler($xml_parser, "startElementHandler", "endElementHandler");
xml_set_character_data_handler( $xml_parser , "characterDataHandler" );
while( $data = fread($fp, 4096) )
{
if( !xml_parse($xml_parser, $data, feof($fp)) )
{
break; // get out of while loop if we're done with the file
}
}
xml_parser_free($xml_parser);
printf("<table>");
printf("<tr><th>link</th><th>description</th></tr>");
for($i=0 ;$i < 5 ; $i++)
{

printf("<tr><td><a href=\"%s\">%s\"</a></td><td> - %s<br></td></tr>\n" , $mover_headline_data[$i]["link"] ,
$mover_headline_data[$i]["title"] ,
$mover_headline_data[$i]["description"]

);
}
printf("</table>");
?>




Books
 Sponsors
 Random Code
Display an Access database(database)
Odd Or even(math)
store a text file into an array(beginner)
 Random Article
  Network
Programming resources
Tutorials directory
Clickbank mall
sell software
Free auctions, low cost stores
UK products
US products
Gambling directory
Sexy free wallpapers
Hosting resources
ASP site
DVD site
Domain names
Dating site
Software directory
Maxi directory
bigarticle : free articles




beginners PHP Copyright © 2004 onwards by beginnersPHP.