get ptc ad v2

From CashCrusaderWiki

Revision as of 20:43, 26 January 2012 by Jutaky (Talk | contribs)
Jump to: navigation, search

Action init_contestptc_stats fetches statistics of a contest PTC ad group.


Required CashCrusader version: 2.27


Example usage:

<?php $contest = action('init_contestptc_stats', 'contest|1|1'); ?>


Argument details, from left to right:

contest = this is the ad group for the contest PTCs
1 = fetch last contest winner of this specific group, 1=true 0=false
1 = calculate user's contest PTC win counter for this specific group, 1=true 0=false


Return value:

This action returns an array which has contest details. If all details are not needed, the call can be optimized by disabling some statistics as described above.


Example return value:

Array
(
   [prize] => $0.10
   [clicks_left] => 672
   [last_winner] => JohnDoe
   [wins] => 5
)
Personal tools
Administration manual