-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from VladCleantalk/master
fixed errors
- Loading branch information
Showing
2 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require './cleantalk.class.rb' | ||
|
||
sender_info = {cms_lang:'en_US'} #here put locale for your language | ||
request = CleantalkRequest.new | ||
request.auth_key = 'your_key' | ||
request.message = 'test message' #don't use this field for registration check | ||
request.sender_email = '[email protected]' | ||
request.sender_nickname = 'test nickname' | ||
request.sender_ip = '127.0.0.1' | ||
request.js_on = 1 #you should check for JavaScript by yourself | ||
request.submit_time = 11 # you should calculate time for submitting form by youself | ||
request.sender_info = sender_info | ||
|
||
ct = Cleantalk.new | ||
result = ct.isAllowMessage(request) # for message checking | ||
#result = ct.isAllowUser(request) # for registration checking | ||
puts result |