Get the views filter's value
Take a look at hook_views_query_alter(). You can grab exposed filter values by inspecting $_REQUEST and grabbing the appropriate value from that array. I usually implement hook_views_query_alter and just wrap the query in a dpm() call (from the Devel module) so I can browse the array.

If using AJAX in your views, you'll need to refresh the page after you filter your view before Devel can print the array in your messages.