public function submitReport($username, $ip, $evidence, $email)
    {

        if (!$this->apiKey) {
            throw new \Exception("To submit a spam report you need an API Key");
        }

        $apiUrl = "http://www.stopforumspam.com/add.php"
            . "?username=" . urlencode($username)
            . "&ip_addr=" . urlencode($ip)
            . "&evidence=" . urlencode($evidence)
            . "&email=" . urlencode($email)
            . "&api_key=" . urlencode($this->apiKey);

        $response = $this->sendRequest($apiUrl);

        if (preg_match('/data submitted successfully/', $response)) {
            return true;
        } else {
            throw new \Exception("Submission failed.");
        }
    }
public function submitReport($username, $ip, $evidence, $email)
    {

        if (!$this->apiKey) {
            throw new \Exception("To submit a spam report you need an API Key");
        }

        $apiUrl = "http://www.stopforumspam.com/add.php"
            . "?username=" . urlencode($username)
            . "&ip_addr=" . urlencode($ip)
            . "&evidence=" . urlencode($evidence)
            . "&email=" . urlencode($email)
            . "&api_key=" . urlencode($this->apiKey);

        $response = $this->sendRequest($apiUrl);

        if (preg_match('/data submitted successfully/', $response)) {
            return true;
        } else {
            throw new \Exception("Submission failed.");
        }
    }
public function submitReport ( $ username , $ ip , $ evidence , $ email ) { if ( ! $ this -> apiKey ) { throw new \ Exception ( "To submit a spam report you need an API Key" ) ; } $ apiUrl = "http://www.stopforumspam.com/add.php" . "?username=" . urlencode ( $ username ) . "&ip_addr=" . urlencode ( $ ip ) . "&evidence=" . urlencode ( $ evidence ) . "&email=" . urlencode ( $ email ) . "&api_key=" . urlencode ( $ this -> apiKey ) ; $ response = $ this -> sendRequest ( $ apiUrl ) ; if ( preg_match ( '/data submitted successfully/' , $ response ) ) { return true ; } else { throw new \ Exception ( "Submission failed." ) ; } }
Function used to submit a spam report to StopForumSpam,

@author  Helge Sverre <email@helgesverre.com>

@param string $username Username of the spammer.
@param string $ip the ip of the spammer
@param string $evidence evidence of spam, usually you pass it a copy of the original email(with all the headers etc).
@param string $email the spammer's email.
@return bool returns true if report was submitted, \Exception on failure.
Function used to submit a spam report to StopForumSpam