btherl, you're the man.
the code that works is as follows
if you have ?apples=oranges at the end of your page, this will filterGet() will return 'oranges'
ZEND_FUNCTION(filterGet)
{
zval **data;
HashTable *arr_hash;
HashPosition pointer;
int array_count;
zval *arr = PG(http_globals)[TRACK_VARS_GET];
arr_hash = Z_ARRVAL_P(arr);
array_count = zend_hash_num_elements(arr_hash);
for(
zend_hash_internal_pointer_reset_ex(arr_hash, &pointer);
zend_hash_get_current_data_ex(arr_hash, (void**) &data, &pointer) == SUCCESS;
zend_hash_move_forward_ex(arr_hash, &pointer)) {
if (Z_TYPE_PP(data) == IS_STRING) {
PHPWRITE(Z_STRVAL_PP(data), Z_STRLEN_PP(data));
}
return;
}
RETURN_NULL();
return;
}