Skip to content

davidfstr/StreamStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StreamStream

Allows an existing stream object in PHP to be accessed by URL.

This is useful to pass a stream as an input to a PHP API that only accepts URIs for its inputs, such as XMLReader.

StreamStream is implemented as a stream wrapper that reads from another underlying stream.

Example

require_once 'StreamStream.php'

// Open a stream
$stream = fopen('http://en.blog.wordpress.com/feed/', 'rb');

// Create a URI for the stream
$streamUri = StreamStream::createUriForStream($stream);

// Pass the URI to another API
$xmlReader = new XMLReader();
$xmlReader->open($streamUri);

Requirements

  • PHP 5.2.11 or later

License

This code is licensed under the Apache License 2.0. Details can be found in the file LICENSE.txt.

About

Access PHP stream objects by URL.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages