", ">", $val);
		$val = str_replace("<", "<", $val);
		return $val;
	}
	
	function __construct($email, $pw, $agb, $widerrufsverzicht, $testmodus) {
		$this->email = $email;                          // Ihre e-mailadresse mit der Sie bei Pixelletter registriert sind
		$this->pw = $pw;                                // Ihr PixelLetter Passwort
		$this->agb = $agb;                              // muss auf ja stehen
		$this->widerrufsverzicht = $widerrufsverzicht;  // ja = Verzicht akzeptiert / nein = Verzicht nicht akzeptiert
		$this->testmodus = $testmodus;                  // true = Testmodus eingeschaltet / false = Testmodus ausgeschaltet
	}
	
	function signature_options($signature_arr) { // ist optional.
		if($signature_arr) {
			return '
				'.$this->remove_chars($signature_arr["sender"]).'
				'.$this->remove_chars($signature_arr["recipient"]).'
				'.$this->remove_chars($signature_arr["cc"]).'
				'.$this->remove_chars($signature_arr["bcc"]).'
				'.$this->remove_chars($signature_arr["subject"]).'
				
'.$this->remove_chars($signature_arr["body"]).'
				'.$this->remove_chars($signature_arr["filename"]).'';
		}
	}
	
	function cashondelivery_options($cashondelivery_arr) { // ist nur bei Nachnahme (addoption 31) verpflichtend.
		if($cashondelivery_arr) {
			return '
				
					
						'.$this->remove_chars($cashondelivery_arr["name"]).'
						'.$this->remove_chars($cashondelivery_arr["bankaccountid"]).'
						'.$this->remove_chars($cashondelivery_arr["blz"]).'
						'.$this->remove_chars($cashondelivery_arr["bankname"]).'
					
					'.$this->remove_chars($cashondelivery_arr["reasonforpayment1"]).'
					'.$this->remove_chars($cashondelivery_arr["reasonforpayment2"]).'
					'.$this->remove_chars($cashondelivery_arr["amount"]).'
				';
		}
	}
	
	function submit_text($action, $transaction, $address, $fax, $subject, $message, $location, $addoption="", $destination="", $signature_arr="", $returnaddress="", $control="", $cashondelivery_arr="") {
		$this->command = '
		
			
				' . $action . '
				' . $this->remove_chars($transaction) . '
				' . $this->remove_chars($control) . '
				' . $fax . '
				' . $location . '
				' . $destination . '
				' . $addoption . '
				' . $this->remove_chars($returnaddress) . ''.$this->signature_options($signature_arr).$this->cashondelivery_options($cashondelivery_arr).'
			
			
				
				' . $this->remove_chars($address) . '
				
				' . $this->remove_chars($subject) . '
				
				' . $this->remove_chars($message) . '
				
			
		
	';
		return $result = $this->submit();
	}
	
	function submit_upload($action, $transaction, $fax, $file_array, $location, $addoption="", $destination="", $signature_arr="", $returnaddress="", $control="", $cashondelivery_arr="") {
		$this->file_array = $file_array;
		$this->command = '
		
			
				' . $action . '
				' . $this->remove_chars($transaction) . '
				' . $this->remove_chars($control) . '
				' . $fax . '
				' . $location . '
				' . $destination . '
				' . $addoption . '
				' . $this->remove_chars($returnaddress) . ''.$this->signature_options($signature_arr).$this->cashondelivery_options($cashondelivery_arr).'
			
		
	';
		return $result = $this->submit();
	}
	
	function submit_postcard($action, $transaction, $address, $message, $file_array, $location, $addoption="", $destination="", $returnaddress="", $control="", $font="") {
		$this->file_array = $file_array;
		$this->command = '
		
			
				' . $action . '
				' . $this->remove_chars($transaction) . '
				' . $this->remove_chars($control) . '
				' . $location . '
				' . $destination . '
				' . $addoption . '
				' . $font . '
				' . $this->remove_chars($returnaddress) . '
			
			
				' . $this->remove_chars($address) . '
				' . $this->remove_chars($message) . '
			
		
	';
		return $result = $this->submit();
	}
	
	function cancel_order($order_id) {
		$this->file_array = $file_array;
		$this->command = '
		
			' . $order_id . '
		
	';
		return $result = $this->submit();
	}
	
	function get_account_info() {
		$this->command = '
		
			
		
	';
		return $result = $this->submit();
	}
	
	function submit() {
		
		$url = "https://www.pixelletter.de/xml/index.php";
		$formvars = array();
		$formvars["xml"] = utf8_encode('
	
		' . $this->email . '
		' . $this->pw . '
		' . $this->agb . '
		' . $this->widerrufsverzicht . '
		' . $this->testmodus . '