No ... at least I think this isn't correct.
Do you want to verify that the cookies are correct or do you want to set cookies?
If you want to set cookies then it should be smth. like this (in PHP):
PHP Code:
setcookie('bbuserid', $userid, time() + 60 * 60 * 24 * 365, '/', 'domain.com');
setcookie('bbpassword', md5($password . 'FOOBAR'), time() + 60 * 60 * 24 * 365, '/', 'domain.com');
Where $userid is the user id, $password is md5(md5('password') . $salt) and FOOBAR is your vB License Number.