Version 3.1.4
This commit is contained in:
1 parent
1d4720f3e2
commit
ae5c01cc78
2563 files changed
+283048
-240689
No files matched your search
@@ -1,18 +1,21 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Invision Power Services
|
||||
* IP.Board v3.0.5
|
||||
* IP.Board v3.1.4
|
||||
* HTTP Communications - send data via POST and read response
|
||||
* Last Updated: $Date: 2009-02-04 15:05:02 -0500 (Wed, 04 Feb 2009) $
|
||||
* Last Updated: $Date: 2010-01-15 10:18:25 -0500 (Fri, 15 Jan 2010) $
|
||||
* </pre>
|
||||
*
|
||||
* @author $Author: bfarber $
|
||||
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
|
||||
* @license http://www.iinvisionpower.com/community/board/license.html
|
||||
* @package Invision Power Services Kernel
|
||||
* @link http://www.iinvisionpower.com
|
||||
* @license http://www.invisionpower.com/community/board/license.html
|
||||
* @package IP.Board
|
||||
* @subpackage Kernel
|
||||
* @link http://www.invisionpower.com
|
||||
* @since Friday 6th January 2006 (12:24)
|
||||
* @version $Revision: 222 $
|
||||
* @version $Revision: 370 $
|
||||
*
|
||||
* Usage
|
||||
* <code>
|
||||
@@ -36,50 +39,48 @@ if ( ! defined( 'IPS_CLASSES_PATH' ) )
|
||||
class classCommunication
|
||||
{
|
||||
/**
|
||||
* Use sockets flag
|
||||
*
|
||||
* @access public
|
||||
* @var integer
|
||||
*/
|
||||
* Use sockets flag
|
||||
*
|
||||
* @access public
|
||||
* @var integer
|
||||
*/
|
||||
public $use_sockets = 0;
|
||||
|
||||
/**
|
||||
* Error array
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
* Error array
|
||||
*
|
||||
* @access public
|
||||
* @var array
|
||||
*/
|
||||
public $error = array();
|
||||
|
||||
/**
|
||||
* Key prefix
|
||||
* Prefix to identify communication strings
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
* Key prefix
|
||||
* Prefix to identify communication strings
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $key_prefix = '__xsx__';
|
||||
|
||||
/**#@+
|
||||
* Set Authentication
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
* @var string
|
||||
* @var string
|
||||
*/
|
||||
* Set Authentication
|
||||
*
|
||||
* @access public
|
||||
* @var string
|
||||
*/
|
||||
public $auth_req = 0;
|
||||
public $auth_user;
|
||||
public $auth_pass;
|
||||
/**#@-*/
|
||||
|
||||
/**
|
||||
* Receive data from the "send" function
|
||||
*
|
||||
* @access public
|
||||
* @param array Array of fields to return
|
||||
* @return array Array of fields
|
||||
*/
|
||||
* Receive data from the "send" function
|
||||
*
|
||||
* @access public
|
||||
* @param array Array of fields to return
|
||||
* @return array Array of fields
|
||||
*/
|
||||
public function communicationReceiveData( $return_fields=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -106,13 +107,13 @@ class classCommunication
|
||||
}
|
||||
|
||||
/**
|
||||
* Send the data
|
||||
*
|
||||
* @access public
|
||||
* @param string URI to post to
|
||||
* @param array Arry of post fields
|
||||
* @return string File data
|
||||
*/
|
||||
* Send the data
|
||||
*
|
||||
* @access public
|
||||
* @param string URI to post to
|
||||
* @param array Arry of post fields
|
||||
* @return string File data
|
||||
*/
|
||||
public function communicationSendData( $file_location='', $post_array=array() )
|
||||
{
|
||||
if ( ! is_array( $post_array ) OR ! count( $post_array ) )
|
||||
@@ -129,12 +130,12 @@ class classCommunication
|
||||
}
|
||||
|
||||
/**
|
||||
* Filter out fields (optional)
|
||||
*
|
||||
* @access private
|
||||
* @param array Array of fields to return
|
||||
* @return array Array of fields
|
||||
*/
|
||||
* Filter out fields (optional)
|
||||
*
|
||||
* @access private
|
||||
* @param array Array of fields to return
|
||||
* @return array Array of fields
|
||||
*/
|
||||
private function _filterFields( $in_fields=array(), $out_fields=array() )
|
||||
{
|
||||
//-----------------------------------------
|
||||
@@ -188,14 +189,14 @@ class classCommunication
|
||||
}
|
||||
|
||||
/**
|
||||
* Get file contents (with sockets)
|
||||
*
|
||||
* @access private
|
||||
* @param string URI to post to
|
||||
* @param array Arry of post fields
|
||||
* @return string File data
|
||||
* @todo [Future] Doesn't support "chunked" HTTP responses
|
||||
*/
|
||||
* Get file contents (with sockets)
|
||||
*
|
||||
* @access private
|
||||
* @param string URI to post to
|
||||
* @param array Arry of post fields
|
||||
* @return string File data
|
||||
* @todo [Future] Doesn't support "chunked" HTTP responses
|
||||
*/
|
||||
private function _postData( $file_location, $post_array )
|
||||
{
|
||||
//-------------------------------
|
||||
@@ -344,5 +345,3 @@ class classCommunication
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user