CPAINT
[ class tree: CPAINT ] [ index: CPAINT ] [ all elements ]

Source for file cpaint2.config.php

Documentation is available at cpaint2.config.php

  1. <?php
  2. /**
  3.  * CPAINT (Cross-Platform Asynchronous INterface Toolkit)
  4.  *
  5.  * http://sf.net/projects/cpaint
  6.  *
  7.  * released under the terms of the GPL
  8.  * see http://www.fsf.org/licensing/licenses/gpl.txt for details
  9.  *
  10.  * Configuration file for backend scripts, including proxy
  11.  *
  12.  * @package    CPAINT
  13.  * @author     Paul Sullivan <wiley14@gmail.com>
  14.  * @author     Dominique Stender <dstender@st-webdevelopment.de>
  15.  * @copyright  Copyright (c) 2005-2006 Paul Sullivan, Dominique Stender - http://sf.net/projects/cpaint
  16.  * @version       $Id: cpaint2.config.php 307 2006-09-30 08:17:43Z saloon12yrd $
  17.  */
  18.  
  19. //---- initialization ----------------------------------------------------------
  20. $cpaint2_config                       array();
  21. //  $cpaint2_config['proxy']              = array();
  22. //  $cpaint2_config['proxy']['security']  = array();
  23.  
  24. $cpaint2_proxy_whitelist  array();
  25.  
  26. //---- proxy settings ----------------------------------------------------------
  27. // Use the whitelist for allowed URLs?
  28. $cpaint2_config['proxy']['security']['use_whitelist']    true;
  29. // setting for PHP's error reporting
  30. $cpaint2_config['proxy']['security']['error_reporting']  E_ALL E_NOTICE E_WARNING;
  31. // maximum runtime of the proxy script in seconds. Set to -1 to use PHP's defaults
  32. $cpaint2_config['proxy']['time_limit']                   = -1;
  33. // number of seconds for the proxy to wait until a connection is established
  34. $cpaint2_config['proxy']['connect_timeout']              10;
  35.     /* number of miliseconds to wait for the remote server to answer after the
  36.       proxy has sent its request.
  37.       Set to -1 if no specific value is to be used. */
  38. $cpaint2_config['proxy']['stream_timeout']               2000;
  39.     /* whether or not to use the CURL (Client URL) library for connections
  40.        Possible values:
  41.        0 - Attempt to use PHP's fsockopen function (default for backwards compatibility)
  42.        1 - Attempt to use CURL
  43.        2 - Try socket functions first, failover to CURL
  44.        3 - Try CURL first, failover to socket functions
  45.        
  46.        Note:  The failover condition is reached when the appropriate function for opening
  47.        the connection to the remote server is not available.  If both methods fail, then 
  48.        a non-recoverable error will occur and a message will be passed to the frontend.
  49.        
  50.        This condition is different from the host being unreachable, which will return
  51.        an error, regardless which method is used for attempting the connection.
  52.     */
  53. $cpaint2_config['proxy']['use_curl']                    0;
  54.  
  55. //---- proxy security whitelist ------------------------------------------------
  56.     /*     whitelist data should be added to the variable $cpaint2_proxy_whitelist[]
  57.             example: $cpaint2_proxy_whitelist[] = "example.com/test.php";
  58.                 - or -
  59.             example: $cpaint2_proxy_whitelist[] = "example.com";
  60.             ** Omit http:// and https:// from the URL **
  61.     */
  62. // this server
  63. $cpaint2_proxy_whitelist[$_SERVER['HTTP_HOST'];
  64. // needed for the proxy_ping example
  65. $cpaint2_proxy_whitelist['www.salcms.de/test/cpaint2/examples/ping/';
  66. // needed for the google request example
  67. $cpaint2_proxy_whitelist['www.google.com';

Documentation generated on Mon, 03 Aug 2009 21:33:07 +0200 by phpDocumentor 1.4.2