I have some custom code that I want to run.
I want it to run like this-->
(a) User visits http://mysite.com/getdata
--> here I want the plugin's code to be invoked when the user visits "getdata" (or other URL slug)
(2) Now the plugin runs some code, and after that redirects the visitor to get some archived post data.
How do I do the above?