View Single Post
  #735  
Old 03-09-2011, 03:26 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ComoEstaEso-com View Post
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_POST1);
  
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

PHP Code:
phpinfo(); 
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01238 seconds
  • Memory Usage 1,821KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (5)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete