Simpilfied code:
PHP Code:
<?php
require_once('./global.php');
if (is_member_of($vbulletin->userinfo, 5, 6, 7, 9, 10, 11))
{
$var = $vbulletin->userinfo['username'].','.$vbulletin->userinfo['userid'];
}
else
{
$var = 'no';
}
?>
Secondly, I don't understand why you need 2 Scripts.
If you use an include with an URL, the included script will never get cookies.
Also, for cookies to work across subdomains, your cookie-domain must be set to .mysite.com