I'd like to replicate XenForo's spam check during registration through an API request. I have reviewed [bd] API and XenAPI and neither make use of XenForo_Model_SpamPrevention during the registration process. I have attempted to add this code:
$writer = XenForo_DataWriter::create('XenForo_DataWriter_User');
...
$spamModel = XenForo_Model::create('XenForo_Model_SpamPrevention');
$spamResponse = $spamModel->allowRegistration($writer->getMergedData(), new Zend_Controller_Request_Http());
The above code fails at $dataRegistryModel->set('dnsBlCache', $dnsBlCache); because "Message: Mysqli statement execute error : Lost connection to MySQL server during query." A var_dump of $dnsBlCache returns an array with 165040 elements.
@xfrocks @Contex
$writer = XenForo_DataWriter::create('XenForo_DataWriter_User');
...
$spamModel = XenForo_Model::create('XenForo_Model_SpamPrevention');
$spamResponse = $spamModel->allowRegistration($writer->getMergedData(), new Zend_Controller_Request_Http());
The above code fails at $dataRegistryModel->set('dnsBlCache', $dnsBlCache); because "Message: Mysqli statement execute error : Lost connection to MySQL server during query." A var_dump of $dnsBlCache returns an array with 165040 elements.
@xfrocks @Contex
Last edited: