<?php
class cocoQUERYPARSER
{
// This could be accomplished much easier unless some
// PHP-Versions were not installed broken and offered no
// $HTTP_GET_VARS ;-(
function parseQueryString()
{
global $HTTP_SERVER_VARS;
$tmp = split("&", $HTTP_SERVER_VARS[QUERY_STRING]);
$myhttpvars = array();
$mycounter = 0;
while($tmp[$mycounter]!="")
{
$thepair = split("=",$tmp[$mycounter]);
$myhttpvars[$thepair[0]]=$thepair[1];
$mycounter++;
}
$pgid = $myhttpvars[pgid];
if($myhttpvars[paid])
{
$paid = $myhttpvars[paid];
} else {
$paid = 0;
}
if($myhttpvars[cid])
{
$cid=$myhttpvars[cid];
} else {
$cid=0;
}
$action = $myhttpvars[action];
$myreturnval = array(
"action" => $action,
"pgid" => $pgid,
"paid" => $paid,
"cid" => $cid);
return $myreturnval;
}
}
?>
|