The easiest way to use vBulletin tables would be to include global.php at the start of your script. No need to worry about setting up a database connection anymore then:
PHP Code:
require_once('./global.php');
You can then with code like the following get the information:
PHP Code:
$threads = $DB_site->query("
SELECT *
FROM " . TABLE_PREFIX . "thread AS thread
WHERE thread.forumid = 11
ORDER BY dateline DESC
LIMIT 10
");
while ($thread = $DB_site->fetch_array($threads))
{
.....process....
}