includes/http.php
changeset 1333 19b49910e81f
parent 1234 903bb153c265
--- a/includes/http.php	Wed Dec 29 13:25:32 2010 -0500
+++ b/includes/http.php	Thu Dec 30 23:43:16 2010 -0500
@@ -139,6 +139,13 @@
 	var $parms_post = array();
 	
 	/**
+	* A string that can wholly replace the parameters in POST. If false, parameters are used as usual.
+	* @var mixed
+	*/
+	
+	var $post_string = false;
+	
+	/**
  	* The list of cookies that will be sent.
  	* @var array (associative)
  	*/
@@ -344,6 +351,16 @@
 	}
 	
 	/**
+	* Replace POST with a custom string, or false to use parameters through add_post().
+	* @param string
+	*/
+	
+	function set_post($str)
+	{
+		$this->post_string = $str;
+	}
+	
+	/**
  	* Internal function to open up the socket.
  	* @access private
  	*/
@@ -920,7 +937,11 @@
 					$get .= "$name";
 			}
 		}
-		if ( count($this->parms_post) > 0 )
+		if ( is_string($this->post_string) )
+		{
+			$post = $this->post_string;
+		}
+		else if ( count($this->parms_post) > 0 )
 		{
 			$post = '';
 			$i = 0;