[Wolves] Mailing lists and web forums

steve parkes wolves at mailman.lug.org.uk
Fri Jan 10 13:08:01 2003


>From: Aquarius <aquarius-lists@kryogenix.org>
>
>Jon Farmer spoo'd forth:
> >> I'm also unclear how you'd invoke this custom module from the command
> > line,
> >> but I'm sure that that's just lack of knowledge on my part rather than
> >> because it can't be easily done :)
> >
> > Correct :-)
> >
> > Just dont ask me how to do it in Python!
>
>Like this:
>
>import urllib
>d = { "subject": "A post from test.py",
>       "image_subject": "icon1.gif",
>       "message": """This is the full text of a post made by test.py.
>        It contains embedded newlines and embedded 
><strong>HTML</strong>.""",
>       "forum": "5",
>       "submit": "Send"
>     }
>postReq = urllib.urlencode(d)
>formAction = 
>"http://www.wolveslug.org.uk/modules.php?op=modload&name=Forums&file=newtopic"
>res = urllib.urlopen(formAction,postReq)
>
>Pretty simple, huh? I did inadvertently post twice to the main forum
>(because I put the wrong forum number in, oops) but that's all the code you
>need. Pretty easy, eh?
>
>Obviously the final script will need to be more complicated; it needs to
>know whether the mail it's echoing to the forum is a new post or follows up
>an old one, etc etc, but the principle is there.
>

Sweet but as a GET URL works (very secure) shorter messages could be chucked 
at the server with no fuss what so ever.

http://www.wolveslug.org.uk/modules.php?op=modload&name=Forums&file=newtopic&subject=This+is+a+test+of+posting+via+a+GET+URL&image_subject=icon1.gif&message=sorry+if+this+test+message+works+but+it+is+a+test+to+see+if+GET+posts+work&forum=1&submit=Send

posted a message to the forums.

sparkes

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963