Best place to intercept extra URL parameters

Mike_Waters - June 23, 2009 - 14:02

I am implementing simple affiliate functionality, e.g. site.com/page?affiliate=affiliate-name (in the case of clean urls).
Where is the best place to hook to intercept those extra parameters, so that I can set a custom cookie?

I know of three:

hook_init()
hook_menu()
_phptemplate_variables

I am currently using hook_init() but would like to know what the best-practice is.

I want to always intercept these parameters, even in the case of a cached page.
Thanks!

how about let your parameters

siodong - June 25, 2009 - 02:09

how about let your parameters be free and catch it with arg? or maybe htaccess can do some for you.

 
 

Drupal is a registered trademark of Dries Buytaert.