Results 1 to 6 of 6
  1. #1
    Join Date
    October 4th, 2007
    PHP Script for grabbing Affiliates Sales Stats?
    Does anyone have a PHP-based (or even a .NET-based) script for pulling in one's daily sales & commissions from various affiliate networks?

    I'm primarily interested in one that can auto-login to amazon every day, but I'd also be interested in something that pulls from other networks.


    - Racer

  2. #2
    Join Date
    November 13th, 2008
    To do that you would have to cURL "POST" requests to the amazon post page and then scape the data from the page you need. This can be quite complex and sometimes very hard to get around. You might Google "data scraping" and also research the use of "cURL" for posting requests.

  3. #3
    Join Date
    June 3rd, 2007
    the Netherlands
    I wrote a script that did that once. I called it Affiliate Income Dashboard. Here is the link (link removed)

    But I think I will need to update it as itīs a script of last year and havent looked at it much this year. I will look at it later this week and see if all is working as it should be.

    Last edited by loxly; September 29th, 2009 at 04:18 PM. Reason: Can't Advertise your product with buying an ad

  4. #4
    Outsourced Program Manager John Jupp's Avatar
    Join Date
    January 23rd, 2005
    Affmeter is a great stats and sales analytics tool.
    Flambi Media Limited - USA/UK/EU Affiliate Management Expertise

  5. #5
    Join Date
    March 22nd, 2010
    Not sure if I can include this link here:

    * Coded By: Chad Scira (if you remove this, you will spontainously combust)
    * Gives you the ability to run a full blown CURL call with just a url and an array
    * @var string
    * @var array
    function curl_http_request ($url, $options)
    $handle = curl_init($url);
    foreach ($options as $option => $value) curl_setopt($handle, constant($option), $value);
    $buffer = curl_exec($handle);
    return $buffer;

    curl_http_request('', array(
    'CURLOPT_POST' => true,
    'CURLOPT_POSTFIELDS' => 'username=foo&password=bar',
    'CURLOPT_USERAGENT' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv: Gecko/2009011912 Firefox/3.0.6',
    'CURLOPT_COOKIEJAR' => 'cookie.txt',
    'CURLOPT_COOKIEFILE' => 'cookie.txt'

    This actually took me a little while to get working - only because I didn't realize that it was actually logging into the site - (by default it does not display output)...

  6. #6
    Join Date
    August 29th, 2008
    Amazon is doable using cURL, as their interface isn't too heavily Ajax/JS based.

    Some of the other networks (Adsense for example) are fairly difficult to script (in terms of pulling detailed stats).

    There are a couple of paid solutions out there that can aggregate all of your earnings across networks.

  7. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Any php script to grab CB stats
    By mpchekuri in forum Programming / Datafeeds / Tools
    Replies: 0
    Last Post: March 25th, 2012, 08:43 AM
  2. Need help with PHP Script..
    By triumph in forum Midnight Cafe'
    Replies: 6
    Last Post: August 25th, 2005, 07:58 AM
  3. need help with php script
    By oscar in forum Programming / Datafeeds / Tools
    Replies: 15
    Last Post: June 29th, 2004, 04:15 PM
  4. Affiliates PHP Script
    By gliebster in forum In-House Programs
    Replies: 8
    Last Post: April 14th, 2004, 12:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts