Beiträge von torsten81

    Hallo,


    ich habe mal das RSS Sript hier probiert aber es kommt eine Fehlermeldung.


    [code1:37723553b5]
    Warning: fopen(home/httpd/vhosts/tsv-ellerbek.de/subdomains/handball/httpdocs/feed.xml): failed to open stream: No such file or directory in /home/httpd/vhosts/tsv-ellerbek.de/subdomains/handball/httpdocs/write_rss_feed.php on line 62


    Warning: fputs(): supplied argument is not a valid stream resource in /home/httpd/vhosts/tsv-ellerbek.de/subdomains/handball/httpdocs/write_rss_feed.php on line 63


    Warning: fclose(): supplied argument is not a valid stream resource in /home/httpd/vhosts/tsv-ellerbek.de/subdomains/handball/httpdocs/write_rss_feed.php on line 64[/code1:37723553b5]


    ALs testcode habe ich bisher:


    [code1:37723553b5]<?php
    $MYSQL_host = "";
    $MYSQL_user = "";
    $MYSQL_passw = "";
    $datenbank = "";


    $mysql_id = mysql_connect( $MYSQL_host, $MYSQL_user, $MYSQL_passw );
    mysql_select_db($datenbank, $mysql_id);


    if (!$mysql_id) {
    echo mysql_errno();
    exit;
    }


    //Unix-Pfad zur Datei
    $datei= "home/httpd/vhosts/tsv-ellerbek.de/subdomains/handball/httpdocs/feed.xml";
    $year = date("Y");


    $xml = "<?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd">
    <rss version="0.91">
    <channel>
    <title>http://www.tsvellerbek.de - Die Handballabteilung des TSV Ellerbek im Internet !</title>
    <link>http://www.tsvellerbek.de</link>
    <description>Die neuesten Artikel auf http://www.tsv-ellerbek.de - Die Internetseite der Ellerbeker Handballteams.</description>
    <language>de-de</language>
    <copyright>$year tsvellerbek.de</copyright>
    <image>
    <url>http://www.pc-special.net/gif/pc-special_80_x.gif</url>
    <title>http://www.tsvellerbek.de</title>
    <link>http://www.tsvellerbek.de</link>
    </image>
    ";


    //Abfrage
    $sql = mysql_query("
    SELECT * FROM damen2_news ORDER BY datum LIMIT 0, 30
    ");


    //Ende SQL-Anfragen


    //die result[] bitte entsprechend der Spaltennamen der DB editieren
    while ($result = mysql_fetch_array($sql, MYSQL_ASSOC)) {
    $description = "";
    $title = $result["titel"].": ".$result["titel"];
    $link = "http://handball.tsv-ellerbek.de/?idart=".$result["idart"];
    $xml .= "
    <item>
    <title><![CDATA[$title]]></title>
    <description><![CDATA[$description]]></description>
    <link><![CDATA[$link&linktype=rss]]></link>
    </item>
    ";
    }


    $xml .= "
    </channel>
    </rss>
    ";


    //File anlegen und speichern
    $file=fopen($datei,"w+");
    fputs($file,$xml);
    fclose($file);


    mysql_close();


    ?>[/code1:37723553b5]