natmchugh/StreamsHttpPost
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
StreamsHttpPost is a class to allow sending of files and other data over HTTP post method specifically without using the cURL library or any none core PHP extensions. Instead it makes use of the streams extension and sets the data as a stream context. This allows the sending of post requests without the need for libcurl. --------To Use-------- $request = new StreamsHttpPost('http://example.com'); $data = array( 'foo' => 'bar', 'baz' => 'bat', ); $page = $request->post($data); --------To Send Files-------- $request = new StreamsHttpPost('http://example.com'); $data = array( 'foo' => 'bar', 'baz' => 'bat', ); $request->addFile('picture' => 'path/to/file'); $page = $request->post($data);
About
re-usable class to allow files and other data to be sent over http post method
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published