[Zope] sending form data offsite

Ed Colmar ed@greengraphics.net
Tue, 11 Mar 2003 00:20:52 -0800 (PST)


Hey again

So I'm close to a solution here...  Thanks for the help everybody!

How did you get the initial form data into your params variable?  I see
that I can use the urllib.quote() method as well for individual values...

-ed-



On 10 Mar 2003, Edward Muller wrote:

> urlencode takes a dictionary of params/values like this:
>
> {
> 'param1' : 'value1',
> 'param2' : 'value2'
> }
>
> It cleans up spaces. I am using it for credit card processing and that
> includes spaces in addresses, names and the like.
>
> On Tue, 2003-03-11 at 01:46, Ed Colmar wrote:
> > Thanks!
> >
> > urlencode does the cleaning up of spaces and illegal characters?  What
> > format does it expect?  Just a string?
> >
> > Cheers!
> >
> > -ed-
> >
> >
> > On 6 Mar 2003, Edward Muller wrote:
> >
> > > I use something like the following to do the exact a same thing...
> > >
> > > import string, urllib
> > > from M2Crypto import m2urllib
> > > encodedParams = urllib.urlencode(params)
> > > url = m2urllib.FancyURLopener()
> > > u =url.open('https://secure.post/location',encodedParams)
> > > data = u.read()
> > >
> > > In an external method ... I use m2crypto because of good SSL support ...
> > > You could probably use the regular httplib if you don't need SSL
> > > support.
> > >
> > > On Wed, 2003-03-05 at 19:12, Ed Colmar wrote:
> > > > Hi fellow zope hackers!
> > > >
> > > > I'm building a site for someone who wants to have the entire site within
> > > > zope, to connect to dbs, etc...  But they use a service that requires them
> > > > to post form data to a master server.
> > > >
> > > > Is there an easy way (in dtml or python) to do this without seeing the
> > > > data transfer or ending up at th other server's pages?
> > > >
> > > > So far I've considered making an external method that uses lynx and dumps
> > > > the return data.  Is this the best way?
> > > >
> > > > Thanks for the help!
> > > >
> > > > -ed-
> > >
>

-- 
Green Graphics   :::   Print and Web Design   :::   510.923.0000