Yo, giving back to STM community, thanks for helping me understand this affiliate game, special thanks to the admin, especially Zeno who is very helpful, lets earn more money
Winston's BuyBuddy/SAM FB rotator 1.6 (updated to 1.6 to support geoip php API)
- geoip country support
- weighted offer link rotation
- SAM subid tracking support
- single FB approval switch for offer
- work with/without http reverse proxy (varnish cache)
- support geoip php api
Script Installation/Usage
------------------------
1. Upload all files to a folder to subdomain or your extra domain.
2. Fill in the url value for $offerurl, the url is the final page which after the redirects.
3. Fill in the url value for $redirect, make sure include the subid parameter, for example ?s1= for cake platform
4. For weighted rotation, if you need 50/50, fill in the $redirect[0] to $redirect[4] with your first offer url, then the rest with second offer url
5. chosen country, the country which the offer being advertised on
6. Set $fb_approval to TRUE when submit to FB for ad approval.
7. if you use maxmind geoip php API, use go_geoip_api.php, rename it to something redirect.php or anything you like
8. if you use the maxmind geoip php class, use go.php, change your $geoip_db_location, if you store your maxmind geoip database elsewhere, your webserver must able to read this folder for geoip lookup to work fine.
9. copy & paste into other folder if you have other campaigns.
10. only rotate.php and geoip folder needed for this script work fully, aff.php and offer.php are for you to undertsnad how this script work.
This is for exclusive for STM's members, no sharing outside, no $97 clickbank product, if caught, you will earn a ban
https://www.dropbox.com/s/en8p8v7rnp...script_1.6.rar
I'm dumb. What does this do exactly?
@brianb : install it and feel the magic
@paycoguy : rotator for SAM
i've never tried doing this...
I see facebook on occasion mass clicking my ads. i assume its a spider thats checking to see that the same URL is the click thru.
I suppose it woudlnt be wise for me to use this on that account?
It's not a cloaker, it's just for geo-redirecting traffic. It's better to do that rather than to not do it.
Hi hd2010, the file is no longer exists, could you please re-upload?
hi hd2010,
please re upload
file does not exist
Thank you.
Ya, please reupload it bro!
Ahh that will be awesome can yo ure upload ? 
I will reupload once I back from vacation.
reuploaded
@hd2010 - Good stuff!
Would love to use this script but the only problem is that i already using cpvlab for tracking conversions (subid tracking) and offer rotation (switching url's after approval)...
The only missing is the geo redirects.
Is there a way i can cut some of the code so i can only use the maxmind geoip php API? if yes, are there any files i should not use or upload..?
Don't wanna to make any conflicts with cpvlab but really like to integrate with yours!
If all you're wanting to do is some simple georedirection just put an intermediate PHP file between adverts < > CPVlab or between CPVlab < > affiliate link. Edit to fit, make sure to test using proxies + watch the http headers to make sure things are redirecting as you intend.
e.g.
[PHP]
<?php
$subid1 = $_GET['subid1']; //get all individual subids
$subid2 = $_GET['subid2'];
$geo = geoip_record_by_name( $_SERVER['REMOTE_ADDR'] ); //get geoip data
$countrycode = $geo['country_code']; //extract two letter country code
//simple redirect based on country code
switch($countrycode) {
case 'US'or'CA'or'UK':
$redirect[1] = 'http://CPVlaburl.com/whatever?subid1='.$subid1;
$number = mt_rand(1,1);
header("Location:$redirect[$number]");
exit;
case 'DE':
$redirect[1] = 'http://CPVlaburl.com/whatever?subid1='.$subid1;
$number = mt_rand(1,1);
header("Location:$redirect[$number]");
exit;
default: // exceptions
header('Location: OFFERURL');
exit;
}
?>
[/PHP]
Thanks zeno!
STATUS UPDATE: moving to beyondhosting and from what i read, they already have this db installed.. now we just need a php script to call the db?
@zeno - with the code above, what would actually be the campaign url (destination url) for the ads? from what i saw, i need to place the "cpvlab campaign url" in the code above.
Any solution if i already using the "Generate Cloaked pages" feature in cpvlab? should i insert the code you just post inside the cloaked index.php..? or a separate file?
The thing is i never use the original cpvlab campaign url... i always cloak and upload the cloaked index.php file onto a dedicated domain/directory.
Do you think in case of using cloaked url and also the geo redirect script would slow the actual process? too many redirects at once..?
Thanks!
You'd have your Facebook ad point to the redirect file, wherever that may be, which in turn redirects out to your CPVlab links. I can't help much with CPVlab is I don't use it so don't understand how these cloaked pages work and what exactly it is that's being cloaked. On a decent server that georedirection script will only add a couple of hundred milliseconds to the redirect process so isn't a big issue. However if you can edit the cloaked php file CPVlab has made and add the georedirection to that, that would be better. Should be relatively easy I would think. E.g. use script above, after the case: 'US' or whatever part have the contents of the cloaked php file, then under default have it bounce out to the offer? I'm sure someone who uses CPVlab will give you the low down.
[PHP]
<?php
$subid1 = $_GET['subid1']; //get all individual subids
$subid2 = $_GET['subid2'];
$geo = geoip_record_by_name( $_SERVER['REMOTE_ADDR'] ); //get geoip data
$countrycode = $geo['country_code']; //extract two letter country code
//simple redirect based on country code
switch($countrycode) {
case 'US':
//Cloaked CPVlab PHP file code in here
exit;
default: // exceptions
header('Location: OFFERURL');
exit;
}
?>
[/PHP]
I wish STM pay me royalty...
Thanks for your help zeno!
@zeno : in the redirection script, why need to specify each country code in the switch statement ?
I'm not quite sure what you mean - are you referring to my use of "case 'US'or'CA'or'UK':"? I put that there as an example of how to get multiple countries all going to the same link.
yes, that what I mean, that will work