I fear you'll need to be a bit more elaborate in what exactly it is you need.
You are saying that you want "a GPX file containing only certain fields". As far as I know. GPX files are XML files and I assume that there is a schema defining which fields are mandatory and which are optional, so depending on which fields you want to exclude, the file might no longer be a GPX file (violating the schema).
Is there a reason you cannot just use the default "Export to GPX" feature of GSAK? Maybe, if you can tell us what you will need these stripped down GPX files for, we can come up with a solution.
From the subject, I assume that you'll want to somehow use the content of those GPX files as input to a web server which makes the data available using PHP scripts (but again, as you weren't all that detailed in your description that guess might be totally wrong). Apart from being beyond the scope of GSAK (there is no webserver and PHP support in its macro language) I just want to point out that re-distributing data that you got from geocaching.com in the first place is against their TOU, so if the GPX files you want to export contain data that you loaded into GSAK from geocaching.com, you'll be breaking groundspeaks terms of use.
You are saying that you want "a GPX file containing only certain fields". As far as I know. GPX files are XML files and I assume that there is a schema defining which fields are mandatory and which are optional, so depending on which fields you want to exclude, the file might no longer be a GPX file (violating the schema).
Is there a reason you cannot just use the default "Export to GPX" feature of GSAK? Maybe, if you can tell us what you will need these stripped down GPX files for, we can come up with a solution.
From the subject, I assume that you'll want to somehow use the content of those GPX files as input to a web server which makes the data available using PHP scripts (but again, as you weren't all that detailed in your description that guess might be totally wrong). Apart from being beyond the scope of GSAK (there is no webserver and PHP support in its macro language) I just want to point out that re-distributing data that you got from geocaching.com in the first place is against their TOU, so if the GPX files you want to export contain data that you loaded into GSAK from geocaching.com, you'll be breaking groundspeaks terms of use.