Nieuw lid |
|
Dit MOET ook in de nieuws.xml komen en weet niet hoe:
<items license="Don't remove this paragraph, or your template will stop working. Amara Software owns the copyright to this template, which may not be sold or resold, in its original form or as part of another template, by anyone other than Amara Software. To check the full license restrictions, please refer to http://www.amar..."/>
Bovenaan in newsfeed stoppen of hoe???
<?php
...
$_xml .= '<?xml version="1.0" ?>' . "\n";
$_xml .= '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/">' . "\n";
$_xml .= '<channel>' . "\n";
$_xml .= '<title>' . $_ttl . '</title>' . "\n";
$_xml .= '<link>' . $_lnk . '</link>' . "\n";
$_xml .= '<description>' . $_des . '</description>' . "\n";
$_xml .= '</channel>' . "\n";
/********************************
Number of records to return
********************************/
$_count = 3;
/********************************
DB Variables
********************************/
$_server = 'localhost';
$_dbname = 'hehe';
$_dbuser = 'hehe';
$_dbpass = 'hehe';
/********************************
DB Connection
********************************/
if ( !@mysql_connect( $_server, $_dbuser, $_dbpass ) ) {
echo( 'Could not establish a connection to the database' );
exit;
}
/********************************
Select DB
********************************/
if ( !@mysql_select_db( $_dbname ) ) {
echo( 'Could not establish a connection to the database' );
exit;
}
/********************************
DB Query
********************************/
$_qry = @mysql_query( "SELECT news_ID, news_header FROM news ORDER BY news_ID DESC LIMIT $_count" );
/********************************
Create the syndication
********************************/
while ( $row = @mysql_fetch_array( $_qry ) )
{
$_xml .= '<item>' . "\n";
$_xml .= '<title>';
$_xml .= $row["news_header"];
$_xml .= '</title>' . "\n";
$_xml .= '<link>';
$_xml .= 'http://www.cyclingnews.be/nieuws.php?news_ID='. $row["news_ID"];
$_xml .= '</link>' . "\n";
$_xml .= '</item>' . "\n";
}
$_xml .= '</rdf:RDF>' . "\n";
/***********************************
Write XML to file
***********************************/
$_file = 'news.rss';
$_fp = fopen( $_file, 'w+' );
$_fout = fwrite( $_fp, $_xml );
fclose( $_fp );
/***********************************
Return File to user
***********************************/
echo ("Cyclingfeed\n");
echo ("--> news.rss");
echo ("\n\n<a href='http://www.cyclingnews.be'>Keer terug</a>");
exit;
?>
<?php ... $_xml .= '<?xml version="1.0" ?>' . "\n"; $_xml .= '<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://my.netscape.com/rdf/simple/0.9/">' . "\n"; $_xml .= '<channel>' . "\n"; $_xml .= '<title>' . $_ttl . '</title>' . "\n"; $_xml .= '<link>' . $_lnk . '</link>' . "\n"; $_xml .= '<description>' . $_des . '</description>' . "\n"; $_xml .= '</channel>' . "\n"; /******************************** Number of records to return ********************************/ $_count = 3; /******************************** DB Variables ********************************/ $_server = 'localhost'; $_dbname = 'hehe'; $_dbuser = 'hehe'; $_dbpass = 'hehe'; /******************************** DB Connection ********************************/ echo( 'Could not establish a connection to the database' ); } /******************************** Select DB ********************************/ echo( 'Could not establish a connection to the database' ); } /******************************** DB Query ********************************/ $_qry = @mysql_query( "SELECT news_ID, news_header FROM news ORDER BY news_ID DESC LIMIT $_count" ); /******************************** Create the syndication ********************************/ { $_xml .= '<item>' . "\n"; $_xml .= '<title>'; $_xml .= $row["news_header"]; $_xml .= '</title>' . "\n"; $_xml .= '<link>'; $_xml .= 'http://www.cyclingnews.be/nieuws.php?news_ID='. $row["news_ID"]; $_xml .= '</link>' . "\n"; $_xml .= '</item>' . "\n"; } $_xml .= '</rdf:RDF>' . "\n"; /*********************************** Write XML to file ***********************************/ $_file = 'news.rss'; $_fp = fopen( $_file, 'w+' ); $_fout = fwrite( $_fp, $_xml ); /*********************************** Return File to user ***********************************/ echo ("\n\n<a href='http://www.cyclingnews.be'>Keer terug</a>"); ?>
Hoe moet dit dan???
Thx in advance!
Citaat: Rensjuh edit:
[..code..]tags![/code] |