Tuesday, September 28, 2010

Advanced XML-RPC Tags tutorial

Free SEO Tools Pay Per Click is an innovative, international advertising Profit-Sharing company and is FREE to join. With our service we allow advertisers to reach thousands of potential customers by displaying their ad on our pages. The Pay Per Click system has been developed with the professional online marketer in mind and is made to last; we have opened our business on News Opening in May the 1st 2010. Your Business is important to us! We look after our advertisers. We can guarantee that all the traffic that they receive is genuine; we keep our membership database clean from un-active members and constantly implement strong security procedures to make sure that You get ONLY the quality traffic that You deserve to your Business.How it works BuxifY members get paid to view ads for 5 - 20 seconds. In order to earn even more, simply just refer your friends and relatives because You will be earning up to $0.01 s.d $50 for each new member that You refer to us and their clicks will be added to your earnings. On top of that we offer a 10% Referral Upgrade commission on each upgrade made by your referrals. Upgraded members may earn up to 130% back on their spend on their Pay Per Click account.As a Pay Per Click member you can spend your earnings inside workwithppc.blogspot.com to ADVERSTISE, to buy REFERRALS or to GET AN IRON UPGRADE.So what are You waiting for?..Start your make money online at blog life today; join now and Pay Per Click Yourself!!


XML-RPC invocation tags are intended for advanced users who have a basic understanding of programming, whether in PHP or another language.
An example PHP script is included with OpenX for delivering XML-RPC data. However, a script could be written in any language to read and print the data returned by OpenX. XML-RPC is simply a ‘protocol which uses XML to encode its calls and HTTP as a transport mechanism’ (http://en.wikipedia.org/wiki/XML-RPC).
The XML-RPC tag generated by OpenX contains a comment above it with tips on placing the tag on your website, but this tutorial will go into advanced details.
A default tag (with the comment block removed) looks like this:
  //ini_set('include_path', '.:/usr/local/lib');
  require 'openads-xmlrpc.inc.php';
  if (!isset($OA_context)) $OA_context = array();
  $oaXmlRpc = new OA_XmlRpc('localhost', '/openads/www/delivery/axmlrpc.php', 0, false, 15);
  $adArray = $oaXmlRpc->view('zone:6', 0, '', '', 0, $OA_context);
  echo $adArray['html'];
?>
Note: Please generate the code from your OpenX installation, choosing the options you want from the invocation tag generation page. The above code will not work on your server because you will have different domain and path settings.
You must place the example file – openads-xmlrpc.inc.php – on the server of the publisher's website. You must then either change the 'ini_set' line to tell the script where this file is located, or you must change the 'require' line to use an absolute path:
  // remove the 2 slashes to uncomment the ini_set line
  ini_set('include_path', '.:/path/to/the/file');
  // or, edit the require line:
  require '/path/to/openads-xmlrpc.inc.php';
All lines except the 'echo' line at the end are intended to be placed before any output from your website. The 'echo' displays the banner on the website. In order to display multiple banners you will want to make multiple calls at the top of your document, and 'echo' the relevant banners where you wish.
To prevent displaying multiple banners we've added the option "Don't show the banner again on the same page" to the invocation tag, which uses the $OA_context array:
  //ini_set('include_path', '.:/usr/local/lib');
  require 'openads-xmlrpc.inc.php';
  if (!isset($OA_context)) $OA_context = array();
  $oaXmlRpc = new OA_XmlRpc('localhost', '/openads/www/delivery/axmlrpc.php', 0, false, 15);
  // this is for 3 banners
  // change $n<=3 to the # of banners you want
  for ($n=1; $n++; $n<=3) {
    $adArray[$n] = $oaXmlRpc->view('zone:6', 0, '', '', 0, $OA_context);
    $OA_context[] = array('!=' => 'bannerid:'.$adArray['bannerid']);
  }
?>

PAYOUT OPTION:
Transit Money:
Joined
Joined
Joined
Joined
Joined
Joined
FREQUENCY:
DAILY
DAILY
DAILY
DAILY
DAILY
DAILY

1 comments:

Anonymous said...

Hi!, there is a big mistake on this tutorial
the line $OA_context[] = array('!=' => 'bannerid:'.$adArray['bannerid']); must be $OA_context[] = array('!=' => 'bannerid:'.$adArray[$n]['bannerid']); to exclude the nth banner and not all.

Post a Comment

Related Posts with Thumbnails