Output to plain text file

Creating and modifying plugins.
Post Reply
FirstGen
Regular
Posts: 5
Joined: Sun Nov 13, 2005 10:43 am
Contact:

Output to plain text file

Post by FirstGen »

Has anyone made a plug in that will output a few of the most recent titles into a PLAIN text file? No HTML formatting including links etc... Just plain text each on there own line. I have a few ideas for a plugin I want to create but first I need to have access to a plain text file that can be writen out into a directory of choice.

Thx
Randall
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Output to plain text file

Post by garvinhicking »

Why don't you use RSS for that? It's an XML format, so you can easily parse it. And it's available for every blog instantly.

So I don't see a reason to create a plugin for that -- even though it could be done easily, of course. ;)

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Guest

Post by Guest »

That would be perfect.... Can anyone help me with it? I dont know anything about RSS parsing.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

RSS parsing is pretty easy, just have a look at your "rss.php?version=2.0" output.

If you are using PHP5, you can use SimpleXML for easy XML parsing. Else, the Onyx or MagpieRSS parsers are really helpful, google up their manual and examples.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply