Please help with API script for site - advise!

smolodoys

Regular Member
Joined
Feb 17, 2010
Messages
339
Reaction score
4
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.
 
you will have to do it as a POST from php, using Curl
something like:

Code:
$ch = curl_init();
$usersemail= "[email protected]";
$url = "http://url-to-post-to.com";
$site = "whatever";

curl_setopt($ch,CURLOPT_REFERER,$site);
curl_setopt($ch, CURLOPT_URL,$url); 
curl_setopt($ch, CURLOPT_POST, 1); 		
curl_setopt($ch, CURLOPT_POSTFIELDS, "email=$email"); 
curl_exec($ch); 
curl_close($ch);

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
 
Back
Top