b2evolution PHP Cross Reference Blogging Systems

Source: /inc/xmlrpc/model/_xmlrpc.funcs.php - 92 lines - 2093 bytes - Summary - Text - Print

   1  <?php
   2  /**
   3   * @package evocore
   4   * @subpackage xmlrpc {@link http://xmlrpc.usefulinc.com/doc/}
   5   * @copyright Edd Dumbill <edd@usefulinc.com> (C) 1999-2001
   6   */
   7  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
   8  
   9  
  10  // Usage:
  11  // $client = new xmlrpc_client( $basesubpath.$xmlsrv_subdir.'xmlrpc.php', $basehost, $baseport );
  12  // $client->debug = true;
  13  
  14  // Original fix for missing extension file by "Michel Valdrighi" <m@tidakada.com>
  15  if(function_exists('xml_parser_create'))
  16  {
  17      /**
  18       * Can we use XML-RPC functionality?
  19       *
  20       * @constant CANUSEXMLRPC true|string Either === true or holds the error message.
  21       */
  22      define( 'CANUSEXMLRPC', TRUE );
  23  }
  24  elseif( !(bool)ini_get('enable_dl') || (bool)ini_get('safe_mode'))
  25  { // We'll not be able to do dynamic loading (fix by Sakichan)
  26      /**
  27       * @ignore
  28       */
  29      define( 'CANUSEXMLRPC', 'XML extension not loaded, but we cannot dynamically load.' );
  30  }
  31  elseif( !empty($WINDIR) )
  32  {    // Win 32 fix. From: "Leo West" <lwest@imaginet.fr>
  33      if (function_exists('dl') && @dl('php3_xml.dll'))
  34      {
  35          /**
  36           * @ignore
  37           */
  38          define( 'CANUSEXMLRPC', true );
  39      }
  40      else
  41      {
  42          /**
  43           * @ignore
  44           */
  45          define( 'CANUSEXMLRPC', 'Could not load php3_xml.dll!' );
  46      }
  47  }
  48  else
  49  {
  50      if (function_exists('dl') && @dl('xml.so'))
  51      {
  52          /**
  53           * @ignore
  54           */
  55          define( 'CANUSEXMLRPC', true );
  56      }
  57      else
  58      {
  59          /**
  60           * @ignore
  61           */
  62          define( 'CANUSEXMLRPC', 'Could not load xml.so!' );
  63      }
  64  }
  65  
  66  if( true !== CANUSEXMLRPC )
  67  {
  68      return;
  69  }
  70  
  71  
  72  load_funcs('_ext/xmlrpc/_xmlrpc.inc.php');
  73  
  74  // b2evolution: Set internal encoding for the XML-RPC library.
  75  global $xmlrpc_internalencoding, $evo_charset;
  76  $xmlrpc_internalencoding = strtoupper( $evo_charset );
  77  
  78  
  79  // --------------------------------------- SUPPORT FUNCTIONS ----------------------------------------
  80  
  81  /*
  82   * evocore: We add xmlrpc_decode_recurse because the default PHP implementation
  83   * of xmlrpc_decode won't recurse! Bleh!
  84   * update: XML-RPC for PHP now copes with this, but we keep a stub for backward compatibility
  85   */
  86  function xmlrpc_decode_recurse($xmlrpc_val)
  87  {
  88      return php_xmlrpc_decode($xmlrpc_val);
  89  }
  90  
  91  
  92  ?>

title

Description

title

Description

title

Description

title

title

Body