Fetch an item from GET data with fallback to POST.

@param string|array|null $index  Index for item to be fetched from $_GET or $_POST
@param integer|null      $filter A filter name to apply
@param mixed             $flags

@return mixed