Your RSS Feed URL:
Tracking Domain:
www.cpagrip.com (Default)
RSS Offer Feed Variable Information & Examples
The RSS Offer Feed is a great way to integrate you own offer display system with our network. Below your will find a list of url request variables and their descriptions along with an example PHP script showing you how to use this tool for a virtual currency display.
RSS Feed URL Variables:
| Variable | Description | Examples | Required |
| &user_id= | This is your affiliate id and is required to process your offer feed. | 2549038 | *Required |
| &key= | This is your unique private access key and is required to process your offer feed. | dfc18a047ae9a7b5dbdb99f6bf82ebde | *Required |
| &ip= |
This is the ip address of your visitor that you want to show the offers to. It's important that we know the ip address of your visitor so we can display the proper offers for their country.
Note: If this variable is blank then the ip of the machine making the rss request will be used instead. |
102.211.146.47 | Optional Required for view recording |
| &tracking_id= | Tracking ID of the user that is going to complete an offer. This could be a users id, email address, or unique username. | 812947, email@website.com, simon123 | Optional |
| &ua= | User Agent of your user. By collecting the user agent, we can automatically determine if web or mobile offers should be displayed. | Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0 | Optional Required for view recording |
| &limit= | Maximum number of offers to display in RSS. | 5 | Optional Compatable with view recording |
| &domain= | This option sets the doman used for offer links provided it is a valid vanity domain. | singingfiles.com, doctoredits.com, tundrafile.com | Optional |
| &showmobile= | This option (when set as yes, true or 1) will include mobile offers in your rss feed, or only mobile offers when set to 'only'. | {blank}, yes, true, 1, only | Optional Not compatable with view recording |
| &showall= |
This option (when set as yes, true or 1) will include all geos and capped offers in your rss feed.. Can be combined with 'showmobile' and 'country' to limit scope while still returning capped offers. |
{blank}, yes, true, 1 | Optional Not compatable with view recording |
| &country= | This option accepts a two character country code to restrict offers in your rss feed to one specific country. | {blank}, US, GB | Optional Not compatable with view recording |
| &offer_type= |
This option accepts text to restrict offers in your rss feed to one specific type of offer. |
{blank}, 'Pin-Submit', 'Mobile Install', 'Free Survey' | Optional Compatable with view recording |
| Variable | Required |
| &user_id= | *Required |
| This is your affiliate id and is required to process your offer feed. | |
| 2549038 | |
| &key= | *Required |
| This is your unique private access key and is required to process your offer feed. | |
| dfc18a047ae9a7b5dbdb99f6bf82ebde | |
| &ip= | Optional Required for view recording |
|
This is the ip address of your visitor that you want to show the offers to. It's important that we know the ip address of your visitor so we can display the proper offers for their country.
Note: If this variable is blank then the ip of the machine making the rss request will be used instead. |
|
| 102.211.146.47 | |
| &tracking_id= | Optional |
| Tracking ID of the user that is going to complete an offer. This could be a users id, email address, or unique username. | |
| 812947, email@website.com, simon123 | |
| &ua= | Optional Required for view recording |
| User Agent of your user. By collecting the user agent, we can automatically determine if web or mobile offers should be displayed. | |
| Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20100101 Firefox/4.0 | |
| &limit= | Optional Compatable with view recording |
| Maximum number of offers to display in RSS. | |
| 5 | |
| &domain= | Optional |
| This option sets the doman used for offer links as provided as it is a valid vanity domain. | |
| singingfiles.com, doctoredits.com, tundrafile.com | |
| &showmobile= | Optional Not compatable with view recording |
| This option (when set as yes, true or 1) will include mobile offers in your rss feed, or only mobile offers when set to 'only'. | |
| {blank}, yes, true, 1, only | |
| &showall= | Optional Not compatable with view recording |
|
This option (when set as yes, true or 1) will include all geos and capped offers in your rss feed.. Can be combined with 'showmobile' and 'country' to limit scope while still returning capped offers. |
|
| {blank}, yes, true, 1 | |
| &country= | Optional Not compatable with view recording |
| This option accepts a two character country code to restrict offers in your rss feed to one specific country. | |
| {blank}, US, GB | |
| &offer_type= | Optional Compatable with view recording |
|
This option accepts text to restrict offers in your rss feed to one specific type of offer. |
|
| {blank}, 'Pin-Submit', 'Mobile Install', 'Free Survey' | |
PHP Example: (examples apply for your server.)
<?php $tracking_id = 'user@gmail.com'; //This is used to track the user doing the offer. can be email, clickid, subid.. etc $userip = $_SERVER['REMOTE_ADDR']; //We need to get the users ip, so the rss feed can display the correct offers for their country. $user_agent = $_SERVER['HTTP_USER_AGENT']; //lets collect their user agent to pass along. $max_offers = ; //max number of offers to display. $feedurl = 'https://www.cpagrip.com/common/offer_feed_rss.php?user_id=2549038&key=dfc18a047ae9a7b5dbdb99f6bf82ebde&limit='.$max_offers.'&ip='.$userip.'&ua='.urlencode($user_agent).'&tracking_id='.urlencode($tracking_id); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $feedurl); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // get the result of http query $output = curl_exec($ch); curl_close($ch); $xml = @simplexml_load_string($output); if($xml !== false) { foreach($xml->offers->offer as $offeritem) { //lets use a custom tracking domain for the links :) $offeritem->offerlink = str_replace('www.cpagrip.com','filetrkr.com',$offeritem->offerlink); //uncomment below if you want to display a point value. //$points = floatval($offeritem->payout) * 100; //lets make offers worth $1.20 appear as 120 points. //echo '<strong>Earn '.$points.' Points</strong><br/>'; echo '<a target="_blank" href="'.$offeritem->offerlink.'">'.$offeritem->title.'</a><br/>'; //uncomment to show offers description //echo $offeritem->description.'<br/>'; //uncomment to show offers image //echo '<img src="'.$offeritem->offerphoto.'">'; } if(count($xml->offers->children())==0){ echo 'Sorry there are no offers available for your region at this time.'; } }else{ echo 'error fetching xml offer feed: '. $output; } ?>
CPAGrip A.I. Assistant