It actually works for vb4. I've tested it yesterday. I haven't tested postfunctions yet, but at least importing new posts/threads worked just fine.
Adding the code below to gateway.php (with your own HTTP_HOST-setting) and the script will pass the evil "bug" found in v4.0 (that I'm unable to describe right now, but this bug was about parsing urls). I added the code just after the "headers-sent" rows...
PHP Code:
// for vb4.0
if (!$_SERVER[HTTP_HOST]) {$_SERVER['HTTP_HOST'] = "forum.tornevall.net";}