Subversion-Projekte lars-tiefland.ci

Revision

Revision 68 | Revision 2049 | Zur aktuellen Revision | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 68 Revision 1257
Zeile 350... Zeile 350...
350
	 * @param	int	$proxy_port
350
	 * @param	int	$proxy_port
351
	 * @return	void
351
	 * @return	void
352
	 */
352
	 */
353
	public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080)
353
	public function server($url, $port = 80, $proxy = FALSE, $proxy_port = 8080)
354
	{
354
	{
355
		if (strpos($url, 'http') !== 0)
355
		if (stripos($url, 'http') !== 0)
356
		{
356
		{
357
			$url = 'http://'.$url;
357
			$url = 'http://'.$url;
358
		}
358
		}
Zeile 359... Zeile 359...
359
 
359
 
Zeile 733... Zeile 733...
733
			.(isset($this->username, $this->password) ? 'Authorization: Basic '.base64_encode($this->username.':'.$this->password).$r : '')
733
			.(isset($this->username, $this->password) ? 'Authorization: Basic '.base64_encode($this->username.':'.$this->password).$r : '')
734
			.'User-Agent: '.$this->xmlrpcName.$r
734
			.'User-Agent: '.$this->xmlrpcName.$r
735
			.'Content-Length: '.strlen($msg->payload).$r.$r
735
			.'Content-Length: '.strlen($msg->payload).$r.$r
736
			.$msg->payload;
736
			.$msg->payload;
Zeile -... Zeile 737...
-
 
737
 
-
 
738
		stream_set_timeout($fp, $this->timeout); // set timeout for subsequent operations
737
 
739
 
738
		for ($written = $timestamp = 0, $length = strlen($op); $written < $length; $written += $result)
740
		for ($written = $timestamp = 0, $length = strlen($op); $written < $length; $written += $result)
739
		{
741
		{
740
			if (($result = fwrite($fp, substr($op, $written))) === FALSE)
742
			if (($result = fwrite($fp, substr($op, $written))) === FALSE)
741
			{
743
			{
Zeile 751... Zeile 753...
751
				elseif ($timestamp < (time() - $this->timeout))
753
				elseif ($timestamp < (time() - $this->timeout))
752
				{
754
				{
753
					$result = FALSE;
755
					$result = FALSE;
754
					break;
756
					break;
755
				}
757
				}
756
 
-
 
757
				usleep(250000);
-
 
758
				continue;
-
 
759
			}
758
			}
760
			else
759
			else
761
			{
760
			{
762
				$timestamp = 0;
761
				$timestamp = 0;
763
			}
762
			}