I dont know if "include" or "require" would work (I guess so though) so I meant adding the code directly in phpheader template. But it doesnt matter if you include or require either because tecnically they are not different then adding the code directly. If you have some PHP knowledge you can also convert the program to a "function", add it to functions.php and call it inside the template or global.php either..
If you want the program to be parsed you have to use either way even if it's a long program. But being a long program doesnt effect the performance: everytime your "any" vbulletin script is parsed "functions.php" with over 2500 lines of code is included in every run..