With Blowfish you only need 21 chars for the salt the rest is forgotten.
This part $2a$12$ is not a salt its the algorithm and cost(iterations of hash).
Your salt can be made simply by sha1 and then return the first 21 chars:
$salt = substr(sha1($_SERVER['HTTP_HOST'].uniqid().microtime(true)),0,21);
So something like:
$algo = '$2a$12$'; //Keep this safe
//store along side hash as the salt, for future compares
$salt = substr(sha1($_SERVER['HTTP_HOST'].uniqid().microtime(true)),0,21);
$hash = crypt('The string to be hashed', $algo.$salt.'$');