Skip to content

php-http/socket-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

94290f4 · Sep 1, 2024
Sep 1, 2024
Sep 1, 2024
Sep 1, 2024
Jan 26, 2016
Jan 26, 2016
Aug 19, 2022
Aug 19, 2022
Sep 1, 2024
Jan 26, 2016
Jan 26, 2016
Sep 1, 2024
Sep 1, 2024
Aug 19, 2022
Sep 1, 2024
Mar 6, 2016
Dec 29, 2020

Repository files navigation

Socket Client for PHP HTTP

Latest Version Software License Build Status Code Coverage Quality Score Total Downloads

The socket client use the stream extension from PHP, which is integrated into the core.

Features

  • TCP Socket Domain (tcp://hostname:port)
  • UNIX Socket Domain (unix:///path/to/socket.sock)
  • TLS / SSL Encyrption
  • Client Certificate (only for php > 5.6)

Installation and Usage

Read the documentation at http://docs.php-http.org/en/latest/clients/socket-client.html

Testing

First launch the http server:

$ ./vendor/bin/http_test_server > /dev/null 2>&1 &

Then generate SSL certificates:

$ composer gen-ssl

Note: If you are running this on macOS and get the following error: "Error opening CA Private Key privkey.pem", check this file.

Now run the test suite:

$ composer test

Contributing

Please see our contributing guide.

Security

If you discover any security related issues, please contact us at [email protected].

License

The MIT License (MIT). Please see License File for more information.