I am currently trying to get the current node id in a php callback script. Basically, I know you can get the current visitorID by doing this
$visitorID = XenForo_Visitor::getUserId();
Also sorry for not linking my account with xenforo license. My admin is on a break and I have to wait for him to add me so for now I must post here.