Jump to content

Recommended Posts

Posted

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,

Posted

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

Posted

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.

  • 5 months later...
  • 1 year later...
Posted

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!

Posted

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, '');       
 

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...