[PLUGIN HELP] _get vars

XBL

Verified User
Joined
Nov 30, 2004
Messages
50
Location
Castricum, The Netherlands
Hi,

I'm currently scripting a custom plugin (and once I get the hang of it, I'll make some cool addons for DA ;)), but I'm stuck on a problem that I can't use get-vars (like: $_GET['var']).

I searched the forum for a bit, so I knew that it wasn't possible to use it with DA, so I made this little workaround (stole it from the awstats-plugin, sorry fusionictnl ;)):

PHP:
// Fix to use _get-vars in DA
parse_str($_SERVER['QUERY_STRING'], $GET);

According to php.net/parse_str I should be able to use something like this:
PHP:
echo $GET['foo'];
If I was requesting a document like index.html?foo=bar and it would echo 'bar'. But too bad, DirectAdmin doesn't like this and gives me this error:
That plugin does not exist for the specified User Level

Does anyone know what's wrong with this? It sucks if you can't use GET vars (haven't tested POST vars, can I use them normally?).

Thanks,

Jochem
 
PeterB said:
It is $_GET, not $GET...
I know, but as I mentioned in the first post, $_GET isn't working (or at least, I read that in another thread, haven't tested it mysql). So I rewrite them using the parse_str function on _SERVER['QUERY_STRING'].

Jochem
 
Back
Top