Permalink
Browse files

Replace curl_setop_array with individual curl_setopt, for maximum com…

…patibility
  • Loading branch information...
dandv committed Aug 6, 2011
1 parent ceb0d25 commit ef732106b4692973b7517af70d88a5fb6c1c3cc4
Showing with 10 additions and 9 deletions.
  1. +4 −2 readme.txt
  2. +5 −6 upload/inc/plugins/report_spammer.php
  3. +1 −1 upload/jscripts/report_spammer.js
View
@@ -1,6 +1,6 @@
DESCRIPTION
=====================
-"Report Spammer" is a MyBB plugin to detect and report spammers using
+"Report Spammer" v1.2 is a MyBB plugin to detect and report spammers using
web sites and services like StopForumSpam.com and WhatIsMyIPAddress.com.
Settings: 1
@@ -52,7 +52,9 @@ CHANGELOG
1.1, 2011-07-27
Added AJAX button to report a spammer or confirm the report to stopforumspam.com
-
+
+1.2, 2011-08-05
+ Use curl_setop instead of curl_setopt_array, for maximum portability (thanks pavemen)
LOCALIZATION
@@ -1,6 +1,6 @@
<?php
/**
- * "Report Spammer" v1.1 MyBB plugin
+ * "Report Spammer" v1.2 MyBB plugin
*
* Use various web sites and services to gather information of spamming activity by the user currently edited in Mod CP.
* Offer the option of reporting the scumbag to StopForumSpam.com.
@@ -208,11 +208,10 @@ function report_spammer_display()
*/
$ch = curl_init();
- curl_setopt_array($ch, array(
- CURLOPT_HEADER => 0,
- CURLOPT_FOLLOWLOCATION => true, // follow redirects
- CURLOPT_RETURNTRANSFER => true // return a string, don't output it directly
- ));
+ ## curl_setopt_array doesn't work in some configurations (see http://community.mybb.com/thread-100846-post-735575.html#pid735575)
+ curl_setopt($ch, CURLOPT_HEADER, false);
+ curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); // follow redirects
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // return a string, don't output it directly
// see http://stopforumspam.com/usage
curl_setopt($ch, CURLOPT_URL, 'http://www.stopforumspam.com/api?email=' . urlencode($user['email']) . '&username=' . urlencode($user['username']) . '&f=serial');
@@ -1,5 +1,5 @@
/**
- * "Report Spammer" v1.1 MyBB plugin
+ * "Report Spammer" v1.2 MyBB plugin
*
* For documentation and license, see https://github.com/dandv/Report-Spammer-MyBB-plugin
*

0 comments on commit ef73210

Please sign in to comment.