/// <summary> /// Submits a spam message /// </summary> /// <param name="Comment">Comment to submit</param> public virtual void SubmitSpam(Comment Comment) { this.Url = SubmitSpamUrl; this.Data = SetupData(Comment); POST(); }
private string SetupData(Comment Comment) { return string.Format(CultureInfo.InvariantCulture,this.CommentCheckData, HttpUtility.UrlEncode(Comment.UserIP), HttpUtility.UrlEncode(Comment.UserAgent), HttpUtility.UrlEncode(Comment.Referrer), HttpUtility.UrlEncode(Comment.Permalink), HttpUtility.UrlEncode(Comment.CommentType), HttpUtility.UrlEncode(Comment.UserName), HttpUtility.UrlEncode(Comment.UserEmail), HttpUtility.UrlEncode(Comment.UserUrl), HttpUtility.UrlEncode(Comment.Content)); }
/// <summary> /// Checks if a comment is spam or ham /// </summary> /// <param name="Comment">Comment to check</param> /// <returns>True if it is spam, false otherwise</returns> public virtual bool IsSpam(Comment Comment) { this.Url = CommentCheckUrl; this.Data = SetupData(Comment); return bool.Parse(POST()); }