Most Referenced Functions
  » google_pagerank()
  » preg_replace()
  » site_pageranks()
  » imagecreatefrompng()
  » htmlentities()
  » imagepng()
  » imagestring()
  » imagedestroy()
  » preg_match()
  » imagecolorallocate()
  » header()
  » fopen()
  » getimagesize()
  » session_start()
  » strstr()
  » preg_match_all()
  » strpos()
  » ob_start()
  » ob_flush()
  » flush()
  » str_replace()
  » array2vars()
  » nl2br()
  » htmlspecialchars()
  » setcookie()
  » urlencode()
  » preg_split()
  » ereg()
  » ereg_replace()
  » var_dump()

Our Sponsors
 » Powerpointing
 » Rock Music Community - meet fans
 » Business Strategy

Become a sponsor for $15/month. Link is sitewide - PR5 homepage, 20+ PR4 pages, 90+ PR3 pages. Email dave[AT]icemelon[D0T]c0m.

Local search Connecticut furniture stores can be found at FurnitureCatch: Furniture Stores Norwalk, Furniture Stores Stamford, Furniture Stores Greenwich, Furniture Stores New Canaan, Furniture Stores Darien
PHP Functions

Function: stream_copy_to_stream

(PHP 5)

stream_copy_to_stream -- Copies data from one stream to another

Description

int stream_copy_to_stream ( resource source, resource dest [, int maxlength [, int offset]] )

Makes a copy of up to maxlength bytes of data from the current position (or from the offset position, if specified) in source to dest . If maxlength is not specified, all remaining content in source will be copied.

Parameters

source

The source stream

dest

The destination stream

maxlength

Maximum bytes to copy

offset

The offset where to start to copy data

Return Values

Returns the total count of bytes copied.

ChangeLog

Version Description 5.1.0 Added the offset parameter

Examples

Example 1. A stream_copy_to_stream() example

<?php
$src = fopen('http://www.example.com', 'r');
$dest1 = fopen('first1k.txt', 'w');
$dest2 = fopen('remainder.txt', 'w');

echo stream_copy_to_stream($src, $dest1, 1024) . " bytes copied to first1k.txt\n";
echo stream_copy_to_stream($src, $dest2) . " bytes copied to remainder.txt\n";

?>

Related Function(s)

  • copy()
  • Icemelon -- PHP, CSS, Javascript Tutorials, & More!
      © 2005-2010 Icemelon.com   Email: dave[AT]icemelon[D0T]c0m