RE: php-master-web /scripts update-backend
| From: | James Cox | Date: | Tue, 19 Nov 2002 19:21:38 +0000 |
| Subject: | RE: php-master-web /scripts update-backend | ||
| References: | 1 | Groups: | php.mirrors |
| Request: | Send a blank email to php-mirrors+get-13695@lists.php.net to get a copy of this message | ||
ok, so the problemo is in this little snippet:
// Parse the index file searching for news item information
function ParseNews ($index_page = "") {
// Split the file by newlines
$lines = preg_split("/\n/", $index_page);
print "<pre>"; print_r($lines); print "</pre>";
it actually prints the file too... well, stdout -- print_r is probably not
the function to be used here, and if you do it needs to be encased in output
buffers. i also get the actual generated rss on stdout.
-- james
> -----Original Message-----
> From: Gabor Hojtsy [mailto:gabor@hojtsy.hu]
> Sent: Tuesday, November 19, 2002 7:19 PM
> To: James Cox; php-mirrors@lists.php.net
> Subject: Re: php-master-web /scripts update-backend
>
>
> With what part of the code? It was not intentional ;)
>
> Goba
>
> ----- Original Message -----
> From: "James Cox" <james@imajes.info>
> To: "Gabor Hojtsy" <gabor@hojtsy.hu>; <php-mirrors@lists.php.net>
> Sent: Tuesday, November 19, 2002 8:16 PM
> Subject: RE: php-master-web /scripts update-backend
>
>
> > good try, but you broke the update script. :)
> >
> > -- james
> >
> > > -----Original Message-----
> > > From: Gabor Hojtsy [mailto:gabor@hojtsy.hu]
> > > Sent: Tuesday, November 19, 2002 5:54 PM
> > > To: php-mirrors@lists.php.net
> > > Subject: cvs: php-master-web /scripts update-backend
> > >
> > >
> > > goba Tue Nov 19 12:54:25 2002 EDT
> > >
> > > Modified files:
> > > /php-master-web/scripts update-backend
> > > Log:
> > > Add the RSS generator code to the flow of autogeneration,
> > > and see what will happen now (the rss_parser code is
> > > tested to work)
> > >
> > >
> > > Index: php-master-web/scripts/update-backend
> > > diff -u php-master-web/scripts/update-backend:1.6
> > > php-master-web/scripts/update-backend:1.7
> > > --- php-master-web/scripts/update-backend:1.6 Sun Mar 3 13:53:10 2002
> > > +++ php-master-web/scripts/update-backend Tue Nov 19 12:54:25 2002
> > > @@ -21,6 +21,15 @@
> > >
> > >
> > > fetch_into_file("http://master.php.net/fetch/events.php?nm=3&token
> > > =$token",
> > > "$root/backend/events.csv");
> > >
> > > +/* create RSS news feed file */
> > > +$dest = fopen("$root/news.rss", "w");
> > > +if (!$dest) { echo "failed to open $root/news.rss for writing"; }
> > > +else {
> > > + include "rss_parser";
> > > + fwrite($dest, $RSS);
> > > + fclose($dest);
> > > +}
> > > +
> > > function fetch_into_file($url,$file) {
> > > $source = @fopen($url,"r");
> > > if (!$source) {
> > >
> > >
> > >
> >
>
>
>