httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Poeml <po...@suse.de>
Subject Re: parsing querystring parameters
Date Mon, 03 Nov 2008 22:58:03 GMT
Hi Jason,

On Mon, Nov 03, 2008 at 05:48:58PM -0500, Jason Fister wrote:
> is there an apr utility function that would let me extract the values of
> querystring variables by specifying the variable name. For e.g. if my
> querysting is something like
> 
> ?key1=val1&key2=val2&key3=val3
> 
> 
> is there a function which takes in key1 as the input and returns val1?
> 
> Jason

There is no direct shortcut function in apr, as far as I know, unless
you want to parse the string manually. IMO, the most convenient method
to do this is to use mod_form's form_value() function. You'll find it at
http://apache.webthing.com/mod_form/. You could look at
https://forgesvn1.novell.com/svn/opensuse/trunk/tools/download-redirector-v2/mod_zrkadlo/mod_zrkadlo.c
to see the way that I am using it. Just search for 'form' there.

HTH,
Peter
-- 
Contact: admin@opensuse.org (a.k.a. ftpadmin@suse.com)
         #opensuse-mirrors on freenode.net
Info: http://en.opensuse.org/Mirror_Infrastructure
 
SUSE LINUX Products GmbH
Research & Development

Mime
View raw message