Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    October 4th, 2007
    Posts
    109
    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.

    Thanks!

    - Racer

  2. #2
    Newbie
    Join Date
    November 13th, 2008
    Posts
    28
    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
    Newbie
    Join Date
    June 3rd, 2007
    Location
    the Netherlands
    Posts
    46
    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.

    Edwin
    Last edited by loxly; September 29th, 2009 at 05: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
    Location
    England
    Posts
    1,502
    Affmeter is a great stats and sales analytics tool.
    Flambi Media Limited - USA/UK/EU Affiliate Management Expertise

  5. #5
    Newbie
    Join Date
    March 22nd, 2010
    Posts
    2
    Not sure if I can include this link here: http://www.youtube.com/watch?v=XcgQUsorF_8

    /*
    * 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);
    ob_start();
    $buffer = curl_exec($handle);
    ob_end_clean();
    curl_close($handle);
    return $buffer;
    }

    curl_http_request('http://www.google.com/', array(
    'CURLOPT_POST' => true,
    'CURLOPT_FOLLOWLOCATION' => true,
    'CURLOPT_POSTFIELDS' => 'username=foo&password=bar',
    'CURLOPT_USERAGENT' => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.6) 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
    Newbie
    Join Date
    August 29th, 2008
    Posts
    1
    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, 09:43 AM
  2. Need help with PHP Script..
    By triumph in forum Midnight Cafe'
    Replies: 6
    Last Post: August 25th, 2005, 08:58 AM
  3. need help with php script
    By oscar in forum Programming / Datafeeds / Tools
    Replies: 15
    Last Post: June 29th, 2004, 05:15 PM
  4. AllPosters.com Affiliates PHP Script
    By gliebster in forum In-House Programs
    Replies: 8
    Last Post: April 14th, 2004, 01: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
  •