Fortunately someone just asked a similar question so I've got it all written up: You need to put your code in a plugin. Here's the manual page for creating a plugin:
https://www.vbulletin.com/docs/html/main/add_plugin
You will need to buffer the output and capture it in a string variable, then register that variable to a template, then add a tag to the template. Here's the manual page that describes including an external file that produces output:
https://www.vbulletin.com/docs/html/..._externalfiles . The code to regiater a variable to a template is below that. Then you need to add your variable in the header template. So the whole thing together might look like this:
Plugin code (hook location global_start):
PHP Code:
ob_start();
require('C://wamp\www\wp-blog-header.php');
$wpheader = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('header', array('wpheader' => $wpheader));
Then in the header template: