1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please help with API script for site - advise!

Discussion in 'CPA' started by smolodoys, Mar 1, 2011.

  1. smolodoys

    smolodoys Regular Member

    Feb 17, 2010
    Likes Received:
    Hello, I'm looking to implement on my site a special script that will submit my users emails to the affiliate offers, like those "emails submit offers" but which script do I use or how is it done? I have heard that I need some type of a API script or whatever its called.

    So basically what I need is a script that will take the user after email submission at my site it would be redirected to the offers 2nd page site and will count as an email submission for me? Anyone knows how to do so? Please advise. Thank you in advance.
  2. eskimo

    eskimo Regular Member

    Dec 1, 2008
    Likes Received:
    you will have to do it as a POST from php, using Curl
    something like:

    $ch = curl_init();
    $usersemail= "[email protected]";
    $url = "http://url-to-post-to.com";
    $site = "whatever";
    curl_setopt($ch, CURLOPT_URL,$url); 
    curl_setopt($ch, CURLOPT_POST, 1); 		
    curl_setopt($ch, CURLOPT_POSTFIELDS, "email=$email"); 
    Basically you create a post, so it looks like a form was submitted and gets posted to the specified url. You will have to modify the code above to the form that needs to get submitted, but a bit of reading online should get you sorted