Suggestions
1. Use the vBulletin class_vurl instead of native curl, less trouble and then its vbulletins fault for "mysql gone away" errors
2. wrap the process in this so that vbulletin deals with reg errors first, thus not having to deal with excess logging
Code:
if (empty($userdata->errors)) {
require_once('includes/functions_sfs.php');
sfs_process();
}]
and finally, some credit for reusing my code wouldnt go amiss.