[Need Help] CPAGRIP PHP offr id filtering

0 replies
I have started doing cpa marketing with cpagrip for in app monetization this going great but I like to know how I can filter the offers inside PHP file to display only offers that are related to my niche.

I know from documentation that they serve the offer via &id= this is great but I cannot get it to work inside the PHP file if anyone know how to do this please let me know I would really appreciate it. Thanks in advance from a beginner cpa marketer.

This is my PHP code until now.

$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 = 3; //max number of offers to display.

$offer_cnt = 0;
$feedurl = 'http://www.cpagrip.com/common/offer_feed_rss.php?user_id=30363&key=396e73a06c1d6 0134cc97b01ad47803b&ip='.$userip.'&ua='.urlencode( $user_agent).'&tracking_id='.urlencode($tracking_i d);
if($xml = simplexml_load_file($feedurl, 'SimpleXMLElement', LIBXML_NOCDATA)) {
foreach($xml->offers->offer as $offeritem) {

//lets use a custom tracking domain for the links
$offeritem->offerlink = str_replace('www.cpagrip.com','filetrkr.com',$offe ritem->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 . '"><img src="' . $offeritem->offerphoto . '"></a>';

//uncomment to show offers description
//echo $offeritem->description.'<br/>';

break; //lets stop listing offers and exit the loop.
echo 'Sorry there are no offers available for your region at this time.';
echo 'error fetching xml offer feed.';
#cpagrip #filtering #offr #php

Trending Topics