Is there an easy way to see active subscribers

Discussion in 'Integration' started by benfitts, Jan 31, 2012.

  1. benfitts

    benfitts Member

    Joined:
    Apr 10, 2008
    Messages:
    111
    I need to programmatically (in php) be able to list all:

    active subscribers to a specific product

    It is independent of amember and no one is logged in. I need to be able to run a query against my amember data to show me all active subscribers to a specific product.

    There must be an easy way to do this?

    Thanks in advance.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    You can use aMember API for this:
    PHP:
    include "/full/path/to/amember/config.inc.php";
    $ul $db->users_find_by_product($product_ids$include_expired,$start$count);
    parameters:
    $product_ids - product ID or array of product IDs
    $include_expired - should amember query for expired users as well (true|false)
    $start -return records from $start position
    $count - number of records to return.
  3. benfitts

    benfitts Member

    Joined:
    Apr 10, 2008
    Messages:
    111
    Worked perfect. Thanks Alex. Exactly what I wanted to know.

Share This Page