cURL / Mailing Lists / curl-library / Single Mail

curl-library

Unable to post form data to server

From: preetic <preetic_at_mahiti.org>
Date: Mon, 29 Jul 2002 16:38:32 +0530

Hi all!

I have been trying to post form field values(ie the username and password
) of a login page in order to get the logged in page.I have not been able
to achieve this.I get a page login failure page instead.
the code is as follows:-

import pycurl
curl=pycurl.init()
curl.setopt(pycurl.URL, 'http://www.zope.org/logged_in.html')
dataread="__ac_name=ABC & __ac_password=rtrt & submit=Login &
came_from=http://www.zope.org/login.html" #have not supplied the correct
name n password
curl.setopt(pycurl.POST,1)
curl.setopt(pycurl.POSTFIELDS,dataread)
curl.setopt(pycurl.COOKIEJAR,'my.txt')
curl.perform()
curl.cleanup()

Can anybody help me with this and tell me where i am going wrong?

Cheers

Preeti

-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
Received on 2002-07-29