arivanbastos Posted November 27, 2014 Report Posted November 27, 2014 Hello, I'm using the follow code to display a banner in PHP: if (@include_once('/www/delivery/alocal.php')) { if (!isset($phpAds_context)) { $phpAds_context = array(); } } $phpAds_raw = view_local('', 1, 0, 0, '', '', '0', $phpAds_context, ''); echo $phpAds_raw['html']; How can I pass custom variables (site variables) to be used as filters for banner display? This seems to be a very basic question, but I could not find the answer even searched enough. Thank u so much. Regards, Quote
2ge Posted December 1, 2014 Report Posted December 1, 2014 so big coincidence...I just wanted to find out exactly same...so I got same question. I am using site variables, with XML-RPC works good, but with local mode tag no success how to implement this. Please help Quote
2ge Posted December 1, 2014 Report Posted December 1, 2014 well, after little bit debugging and checking the code, and hit & miss technique, I found out, it is just enough write in script: $_REQUEST['variable'] = 'condition'; hope this will help somebody. Quote
michal Posted July 26, 2016 Report Posted July 26, 2016 Can you write a full example of it? if site variable: {name: 'myname', value: 'myvalue'} what is the condition syntax and where in the invocation code I need to place it? Thanks! Quote
2ge Posted July 26, 2016 Report Posted July 26, 2016 something like this: ...you need to set some cookie first $_COOKIE['OAID'] = md5(rand(1,100000000)); ...and then you set up your params $_REQUEST['foo'] = 'bar'; require_once('/data/www/yourserver.com/www/delivery/alocal.php'); $adArray = view_local('', $zoneid, 0, 0, '', '', '0', $OA_context, ''); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.