I got an interesting question today via PM, and preferred to post this thread as it may help others.
Scenario:
You're promoting an offer that has a daily cap, network wide. (for account wide daily caps, you can use the ready-made cap condition in FunnelFlux). When the offer reaches its maximum cap, the network automatically redirects to another offer that you can't or don't want to promote for a reason or another.
Is it possible to automatically redirect to an offer of your choice when the network switches to that other offer?
Answer: of course you can do that with FunnelFlux and its PHP Nodes 
The solution is to use a PHP Node before redirecting to offer 1, to check its page content. If some words are there on the page, then all is good and you can link to it. Otherwise, branch to another offer of your choice!
Here's how the funnel looks like:

If some specific content is found on the page, redirect to offer 1. Otherwise redirect to offer 2.
Let's look at the PHP Node itself:
<?php
$url = "http://your-affiliate-link";
$contentThatMustBeHere = "the page content to check for";
$output = file_get_contents( $url );
if( strpos($output, $contentThatMustBeHere) !== false ) {
// content is here... follow route #1
return 1;
}
// content is NOT on target page, follow route #2
return 2;
?>


<?php
$url = "[[content-checker-url]]";
$contentThatMustBeHere = "[[content-checker-body]]";
$output = file_get_contents( $url );
if( strpos($output, $contentThatMustBeHere) !== false ) {
// content is here... follow route #1
return 1;
}
// content is NOT on target page, follow route #2
return 2;
?>
require_once 'PHPNodeHelpers.php'; PHPNodeHelpers::sendMail( [ 'to' => 'you@you.com', 'email-subject' => 'Open this now', 'email-body' => 'The html email content', 'smtp-configuration' => [ 'server' => 'your-smtp.server.com', 'port' => 'port number', 'secure' => 'ssl', // this can be '', 'ssl' or 'tsl' 'username' => 'username to smtp service', 'password' => 'password to smtp service', 'from-name' => 'Me', 'from-email' => 'me@me.com', ] ] );
Wow!
No other tracker out there gives you this amount of flexibility.
If you remove the technical hurdles with the managed version, I doubt any other tracker out there can match the features.
Will this work even for carrier offers? I believe because you are checking the offer page from your server it might not grab the right page. I think I was trying to do something with this a while back but had no way of getting the right page since the requests came from my server and not the user's IP.
man that's sick, I recently had this problem too and had to reduce sending traffic to the offer lest it hits the cap overnite
That's an interesting technique. So on the network side, they would register 2 clicks?
How much extra delay would this add to the flow?
I was thinking about this problem a couple months back. Was considering a 30min polling system, where it checks every 30mins. Rather than check every click to offer.
Vitavee, lets say you are using landers and not direct linking.
Would you be able to pass traffic through a PHP node that is non-blocking, i.e. it does not wait for the page to load for the text check, but does this in the background and sets some parameter that can then be used on lander clickthrough?
I was thinking you could pass a parameter into the accumulated URL buffer to then access later.
E.g. Traffic > PHP Node 1 (does check, but routes traffic immediately) > some lander > PHP Node 2 (checks output PHP node 1 has determined, routes accordingly) > offers.
<?php
$SECONDS_BETWEEN_CHECKS = 60 * 30;
$cacheKey = '{node-id}-content-checker-time';
$lastCheckTimestamp = Cache::quickGet( $cacheKey );
if( $lastCheckTimestamp === null || ($lastCheckTimestamp + $SECONDS_BETWEEN_CHECKS) < time() )
{
Cache::quickSet( $cacheKey, time() );
// INSERT INITIAL CODE HERE
}
?>
I'm glad people are liking this
Good tutorial @vitavee
Vitavee, on sort of the same idea, is it possible to have the tracker allocate 100% of the traffic for that day, if you split test for instance 2 or 3 offers on a rotator and one of them starts strong for the day?
I have observed on some days one offer is doing well, others the other one. Can we automate traffic allocation if a rule like one of the offer's CR's exceeds x% is satisfied?
^ you could read stats through API and then automatically allocate traffic using whatever algo e.g. Thompson Sampling would be easy to implement
I played with that idea in the past but got stuck due to this bug:
https://portal.productboard.com/funn...e=portal_share
I'm preparing a tutorial for you guys, on how to do that. Should be ready soon 
Here you go:
https://stmforum.com/forum/showthrea...-on-Offers-EPV
darn it Vitavee :-)