src/url_fetcher.php
protected function _fwriteStream(&$fp, &$string) {
		$fwrite = 0;
		for($written = 0; $written < strlen($string); $written += $fwrite){
			$fwrite = @fwrite($fp, substr($string, $written));

			if($fwrite === false){
				return $written;
			}

			if(!$fwrite){ // 0 bytes written; error code  11:  Resource temporarily unavailable
				usleep(10000);
				continue;
			}
		}
		return $written;
	}
protected function _fwriteStream(&$fp, &$string) {
		$fwrite = 0;
		for($written = 0; $written < strlen($string); $written += $fwrite){
			$fwrite = @fwrite($fp, substr($string, $written));

			if($fwrite === false){
				return $written;
			}

			if(!$fwrite){ // 0 bytes written; error code  11:  Resource temporarily unavailable
				usleep(10000);
				continue;
			}
		}
		return $written;
	}
protected function _fwriteStream ( & $ fp , & $ string ) { $ fwrite = 0 ; for ( $ written = 0 ; $ written < strlen ( $ string ) ; $ written += $ fwrite ) { $ fwrite = @ fwrite ( $ fp , substr ( $ string , $ written ) ) ; if ( $ fwrite === false ) { return $ written ; } if ( ! $ fwrite ) { // 0 bytes written; error code  11:  Resource temporarily unavailable usleep ( 10000 ) ; continue ; } } return $ written ; }
Writes string to a network socket

See http://php.net/fwrite
Note: Writing to a network stream may end before the whole string is written. Return value of fwrite() may be checked:

@ignore
Writes string to a network socket