Quote:
Originally Posted by ComoEstaEso-com
Hello!
This Product rocks!!
Very happy with it.
We did a small donation to StopForumSpam.com and Akismet
Quick question:
Is there a way to submit spammer's info/data to the spam databases (StopForumSpam) without the spammer having posted?
I ask, because we have gotten three spammers that have registered, haven't posted on the forums, yet their signatures are spam.
Instead of just deleting them, maybe it would be cool to "delete and submit".
Thank you for this awesome mod!! 
|
you can submit spammers by building a form todo it in your admincp here's an example
PHP Code:
if($_REQUEST['do'] == 'submitspam')
{
$vbulletin->input->clean_array_gpc('r',array(
'username' => TYPE_STR,
'email' => TYPE_STR,
'ip_addr' => TYPE_STR,
'api_key' => TYPE_STR,
'evidence' => TYPE_STR
));
print_form_header('glowhostspamomatic','dosubmitspam');
print_input_row('username','username','',1,30);
print_input_row('email','email','',1,30);
print_input_row('ip adress','ip_addr','',1,30);
print_input_row('apikey','api_key',$vbulletin->options['glowhostspamomatic_apikey'],1,30);
print_textarea_row('evidence','evidence','',20,50,1,1);
print_submit_row('submit',0);
}
allright almost there now to submit the form to SFS database you have two options
1) PHP with cURL support
2) PHP with sockets support
PHP Code:
if($_POST['do'] == 'dosubmitspam')
{
$vbulletin->input->clean_array_gpc('p', array(
'username' => TYPE_STR,
'email' => TYPE_STR,
'ip_addr' => TYPE_STR,
'api_key' => TYPE_STR,
'evidence' => TYPE_STR
));
$cURL = curl_init();
curl_setopt($cURL,CURLOPT_URL,"http://www.stopforumspam.com/add.php");
curl_setopt($cURL,CURLOPT_POST, 1);
curl_setopt($cURL,CURLOPT_POSTFIELDS,"username=" . $vbulletin->GPC['username'] . "&ip_addr=" . $vbulletin->GPC['ip_addr'] . "&email=" . $vbulletin->GPC['email'] . "&api_key=" . $vbulletin->GPC['api_key'] . "&evidence=" . $vbulletin->GPC['evidence'] . "");
curl_setopt($cURL,CURLOPT_USERAGENT,"vBulletin cURL spam submitter");
curl_exec($cURL);
if(curl_errno($cURL))
{
die(print_r(curl_error($cURL)));
}
else
{
print_stop_message('spammer_reported_succes'); //this is a phrase
}
curl_close($cURL);//do not forget this
PHP through sockets
PHP Code:
function PostSpam($spamdata)
{
$sock = fsockopen("www.stopforumspam.com",80);
fputs($sock, "POST /add.php HTTP/1.1\n" );
fputs($sock, "Host: www.stopforumspam.com\n" );
fputs($sock, "Content-type: application/x-www-form-urlencoded\n" );
fputs($sock, "Content-length: ".strlen($spamdata)."\n" );
fputs($sock, "Connection: close\n\n" );
fputs($sock,$spamdata);
fclose($sock);
}
with this you need to check the http response either 200(success) or 403(forbidden) usage is the same as the cURL postfields above
PHP Code:
PostSpam(postfields_here)
i added this to the spamomatic log to check if your host supports either cURL or sockets call