#!/usr/bin/perl -w use CGI; use strict; require './OPML.pl'; # Global objects my $opml = OpmlWeb->new(); my $page = CGI->new(); # Global variables my $script = "opmlparse.pl"; my $host = 'hosting.opml.org'; # start &start(); # exit exit; ##### sub start { print $page->header(); while (my $line = ) { # Change script to script if ($line =~ m/\$script/) { $line =~ s/\$script/$script/; } # Run the upload, display the message if ($line =~ m/\$message/) { if ($page->param("path")) { my $path = $page->param("path"); if ($path eq "new") { my $outline; my $userid; my $passwd; my $fullname; my $filename; # User ID if ($page->param("id")) { $userid = $page->param("id"); } else { print "No ID"; exit; } # Password if ($page->param("pw")) { $passwd = $page->param("pw"); } else { print "No PW"; exit; } if ($page->param("un")) { $fullname = $page->param("un"); } else { print "No name"; exit; } if ($page->param("fn")) { $filename = $page->param("fn"); } else { print "No filename"; exit; } # OUTLINE if ($page->param("outline")) { $outline = $page->param("outline"); } else { print "No outline"; } $opml->BuildOpml($fullname, $filename, $userid, $outline); my $temp = $opml->Send($userid, $passwd, $host, $filename); $line =~ s/\$message/$temp/g; } else { $line =~ s/\$message/Lacking a command./g; } } else { $line =~ s/\$message/Ready!/g; } } print $line; } } __DATA__ OPML Web
$message

User ID:

Password:

Full Name:

File Name:

Outline:

To create an outline, use the Kwiki Formatting Rules for lists. Here's an example:

* Hello, World!
** This is my outline.
** What do you think?
*** Good?
*** Bad?
** I like it.
* Good bye!

That list will render an OPML file like this. If you'd like to use the code on your own, it can be found here