1<?php 2 3/** 4 * i-net software provides programming examples for illustration only, 5 * without warranty either expressed or implied, including, but not 6 * limited to, the implied warranties of merchantability and/or fitness 7 * for a particular purpose. This programming example assumes that you 8 * are familiar with the programming language being demonstrated and the 9 * tools used to create and debug procedures. i-net software support 10 * professionals can help explain the functionality of a particular 11 * procedure, but they will not modify these examples to provide added 12 * functionality or construct procedures to meet your specific needs. 13 * Copyright � i-net software 1998-2010 14 */ 15 16/** ******************************************************************** 17 * THIS FILE SHOULD NOT BE MODIFIED 18 ******************************************************************** */ 19 20if(!defined('DOKU_INC')) die('meh'); 21require_once( DOKU_INC . 'inc/HTTPClient.php'); 22 23class HTTPProxy extends DokuHTTPClient { 24 25 var $debugClass = null; 26 27 /** 28 * Constructor. 29 */ 30 function __construct($debug){ 31 global $conf; 32 33 // call parent constructor 34 $this->debugClass = $debug; 35 parent::__construct(); 36 37 $this->timeout = 60; //max. 25 sec 38 $this->headers['If-Modified-Since'] = substr(gmdate('r', 0), 0, -5).'GMT'; 39 $this->status = -1; 40 $this->debug = true; 41 } 42 43 44 /** 45 * print debug info to file if exists 46 */ 47 public function _debug($info,$var=null){ 48 49 if ( !$this->debugClass ) { 50 return; 51 } 52 53 $this->debugClass->message($info, $var, 1); 54 } 55} 56 57//Setup VIM: ex: et ts=4 enc=utf-8 :