Hi,

When you say you that you want to send this data via Apache do you
mean that the web server you are sending to is running Apache 

Yes. 

If you simply want to emulate a a web page with a submit button that
sends a Post you do it with code a bit like the following

import urllib, urllib2
url = "" href="http://www.somesite.com/somefolder/exampl1.cgi">http://www.somesite.com/somefolder/exampl1.cgi"
dict = {}
dict["field1"] = "value1"
dict["field2"] = "value2"
...
dict["fieldn"] = "valuen"
urldata = urllib.urlencode(dict)
req = urllib2.Request(url)
req.add_header('User-agent','Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0')
fd = urllib2.urlopen(req,urldata)

Regards
Peter Jessop


I'll try this out. Thank you!
Patricia

>
> Hope anyone can point me to the right direction..
> Thanks,
> Patricia
>
> _______________________________________________
> Tutor maillist  -  Tutor@python.org
> http://mail.python.org/mailman/listinfo/tutor
>

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to