Passing PHP filtered arguments to Panel and View Pane I have been able to pass URL parameters to a Panel and from there to a View Pane inside the Panel.
However, I must pre-proccess the URL data with PHP. I have only been able to use Visibility rules with PHP in the View Pane but cannot manage to insert the PHP code in order to pass the specific PHP-modified values.
By far the best way to do this is to provide your own context.

See What are Ctools plugin (content type, access, etc), and how does one create them? for how ctools plugins work, and adapt one of the examples to a context plugin instead.

That way you can decide what data is passed into Panels, and on to the individual panes in a safe manner.