phpDocumentor pivotx
modules
[ class tree: pivotx ] [ index: pivotx ] [ all elements ]

Class: pivotx_hashcash

Source Location: /modules/module_spamkiller.php

Class pivotx_hashcash

Property Summary
static mixed   $keys  
mixed   $current_form  
mixed   $current_key  
mixed   $current_name  
mixed   $debug  

[ Top ]
Method Summary
void   clean_keys()   Clean up the keys
void   delete_current_key()   Delete the current key
void   get_current_key()   Get the generated key value
void   get_current_name()   Get the current form name
void   get_javascript()   Get the javascript
void   get_jscomputation()   Taken from WP-HashCash
void   load_keys()   Load all keys
void   logpost()   Log something
void   render_keys()   A simple HTML table overview of all the 'outstanding' keys
string   render_log()   Render the logfile in simple HTML
void   save_keys()   Save keys
void   store_key()   Store key
void   validate_form()   Validate a form

[ Top ]
Properties
static mixed   $keys = false [line 28]
API Tags:
Access:  protected


[ Top ]
mixed   $current_form = false [line 29]
API Tags:
Access:  protected


[ Top ]
mixed   $current_key = false [line 30]
API Tags:
Access:  protected


[ Top ]
mixed   $current_name = false [line 31]
API Tags:
Access:  protected


[ Top ]
mixed   $debug = false [line 33]
API Tags:
Access:  protected


[ Top ]
Methods
clean_keys  [line 171]

  void clean_keys( $in_keys  )

Clean up the keys

Keys get removed if older than an hour

Parameters:
   $in_keys: 

API Tags:
Access:  protected


[ Top ]
delete_current_key  [line 409]

  void delete_current_key( )

Delete the current key

Call this to don't allow the form to be submitted twice


API Tags:
Access:  public


[ Top ]
get_current_key  [line 477]

  void get_current_key( )

Get the generated key value


API Tags:
Access:  public


[ Top ]
get_current_name  [line 489]

  void get_current_name( )

Get the current form name


API Tags:
Access:  public


[ Top ]
get_javascript  [line 501]

  void get_javascript( $form_name, [ $post_callback = false]  )

Get the javascript

Parameters:
   $form_name: 
   $post_callback: 

API Tags:
Access:  public


[ Top ]
get_jscomputation  [line 44]

  void get_jscomputation( $funcname, $val  )

Taken from WP-HashCash

Parameters:
   $funcname: 
   $val: 

API Tags:
Access:  protected


[ Top ]
load_keys  [line 190]

  void load_keys( )

Load all keys


API Tags:
Access:  protected


[ Top ]
logpost  [line 327]

  void logpost( $message  )

Log something

Parameters:
   $message: 

API Tags:
Access:  protected


[ Top ]
render_keys  [line 240]

  void render_keys( )

A simple HTML table overview of all the 'outstanding' keys


API Tags:
Access:  public


[ Top ]
render_log  [line 288]

  string render_log( )

Render the logfile in simple HTML

The line order is reversed and each access is coloured differently


API Tags:
Access:  public


[ Top ]
save_keys  [line 226]

  void save_keys( )

Save keys


API Tags:
Access:  protected


[ Top ]
store_key  [line 348]

  void store_key( [ $key = false], [ $name = false]  )

Store key

Parameters:
   $key: 
   $name: 

API Tags:
Access:  public


[ Top ]
validate_form  [line 443]

  void validate_form( $form_name, $postvalues  )

Validate a form

If valid, the current key is set the one in the form and it is deleted. If invalid, we log it.

Parameters:
   $form_name: 
   $postvalues: 

API Tags:
Access:  public


[ Top ]
Constants
MAX_KEYFILESIZE = 524288 [line 38]

[ Top ]
MAX_KEYS = 1000 [line 37]

[ Top ]
MAX_KEY_PER_IP = 5 [line 36]

[ Top ]
MAX_KEY_RETENTION = 3600 [line 35]

[ Top ]
MAX_LOGFILESIZE = 1049600 [line 39]

[ Top ]

Documentation generated on Tue, 05 Sep 2017 01:06:11 +0200 by phpDocumentor 1.4.3