• Home
  • WORDPRESS
    • PLUGINS
    • PHP
    • Themes
    • DEVELOPMENT
      • Javascript
      • JQuery
      • Mootools
  • WEB DESIGN
    • DESIGN
    • CSS
    • HTML
  • TYPOGRAPHY
    • FONTS
  • RESOURCES
    • TUTORIALS
    • THEMES
    • SLIDERS
    • TECHNOLOGY
  • ARCHIVES
  • CONTACT
  • Advertise

Code Geekz

    • Most Popular

      All time

    • 30 Best Tools for Data Visualization

      37 Comments

    • Best PHP Frameworks for Developers

      33 Comments

    • Latest Stories

      What is new?

    • Building Product Teams That Scale: The Case for Remote .NET Developers

      May 21, 2025

    • Choosing a WooCommerce Theme? Here’s What Most Store Owners Get Wrong

      May 9, 2025

    • Comments

      Most Recent

    • B. Frances on:

      Best WordPress Wedding Themes

    • Ultimate Content Locker Pro on:

      Best WordPress Social Content Locker Plugins for 2017

  • Home
  • WORDPRESS
    • PLUGINS
    • PHP
    • Themes
    • DEVELOPMENT
      • Javascript
      • JQuery
      • Mootools
  • WEB DESIGN
    • DESIGN
    • CSS
    • HTML
  • TYPOGRAPHY
    • FONTS
  • RESOURCES
    • TUTORIALS
    • THEMES
    • SLIDERS
    • TECHNOLOGY
  • ARCHIVES
  • CONTACT
  • Advertise

PHP Libraries for Sending HTTP Requests

0
  • by Gavin
  • In PHP
  • — 8 Jul, 2015

HTTP is the protocol that allows for sending documents back and forth on the web. A protocol is a set of rules that determines which messages can be exchanged, and which messages are appropriate replies to others. Another common protocol is POP3, which you might use to fetch email on your hard disk.
There are dozens of methods you can use to perform various actions related to Http requests. You may have heard of cURL library that most of the servers have enabled and the HTTPRequest class is a very powerful which you can use HTTPRequest class for sending requests as well.

In this post we would like to present our audience some of the best libraries that we can use to send HTTP requests within our PHP code. So, lets check out these PHP Libraries that will simplify our tasks, we would love to hear from you, please share your thoughts by posting a comment below.

1. Unirest

unirest
Unirest is a pack of lightweight HTTP libraries for many languages (PHP, Ruby, Python, Java And Objective-C). It has support for GET, POST, PUT, UPDATE, DELETE operations and its methods + response structure are the same in all languages.

2. Requests

Requests for PHP
Requests is a stable PHP library that uses cURL or fsockopen (depending on the availability) and provides a consistent API. Requests allows you to send HEAD, GET, POST, PUT, DELETE, and PATCH HTTP requests. You can add headers, form data, multipart files, and parameters with simple arrays, and access the response data in the same way. Requests uses cURL and fsockopen, depending on what your system has available, but abstracts all the nasty stuff out of your way, providing a consistent API.

3. Guzzle

guzzle
Guzzle takes the pain out of sending HTTP requests and the redundancy out of creating web service clients. It’s a framework that includes the tools needed to create a robust web service client, including: Service descriptions for defining the inputs and outputs of an API, resource iterators for traversing paginated resources, batching for sending a large number of requests as efficiently as possible.

4. Httpful

httpful
Httpful is a simple, chainable, readable PHP library intended to make speaking HTTP sane. It lets the developer focus on interacting with APIs instead of sifting through curl set_opt pages and is an ideal PHP REST client. It comes with number of features such as custom headers, automatic payload serialization , basic auth, request templates, client side certificate auth and many more.

5. PHP VCR

php vcr
Record your test suite’s HTTP interactions and replay them during future test runs for fast, deterministic, accurate tests. It automatically records and replays HTTP(s) interactions with minimal setup. No modifications to your production code necessary, Easily configure request matching or add custom request matchers, store HTTP interactions on disk in YAML or JSON, supports PHPUnit. Recorded requests and responses can easily be inspected and edited.

6. Buzz

buzz
Buzz is a lightweight HTTP client that you can use to store and retrieve data, very well for beginners to learn more about HTTP clients and how they work in the real world.

7. Goutte

goutte
Goutte is a screen scraping and web crawling library for PHP. Goutte provides a nice API to crawl websites and extract data from the HTML/XML responses.

8. httpClient

httpclient
PHP Http Client is a fully featured HTTP client created 100% in PHP. It doesn’t use cURL or other external libraries.

9. Buzz react

buzz react
Simple async HTTP client for concurrently interacting with multiple HTTP servers, fetching URLs, talking to RESTful APIs, downloading files, following redirects etc. all at the same time.

10. Simple Http Client

simple http client
This is quite useful php library which makes simple HTTP requests from php. Thi s library is available as open source software under the MIT License.

Share

Tags: consistent apihttp client libraryhttprequest classphp http libraryphp librariesphp librarysend http requestsweb service

— Gavin

A Web addicted Geek stuck inside Tron.

  • Previous story JavaScript Libraries for July 2015
  • Next story 15 Useful Atom Packages for Developers

You may also like...

  • Best PHP Development Tools – 2014
  • 15 Best PHP AJAX Contact Forms
  • 12 Best PHP Automated Test Frameworks
  • php scripts for developers 10 Useful Free PHP Scripts for Developers

Enter your em@il & get our posts delivered.





  • Enter your em@il & get our posts delivered.

  • Codegeekz
    • Home
    • PHP
    • PHP Libraries for Sending HTTP Requests
    • Home
    • WORDPRESS
      • PLUGINS
      • PHP
      • Themes
      • DEVELOPMENT
        • Javascript
        • JQuery
        • Mootools
    • WEB DESIGN
      • DESIGN
      • CSS
      • HTML
    • TYPOGRAPHY
      • FONTS
    • RESOURCES
      • TUTORIALS
      • THEMES
      • SLIDERS
      • TECHNOLOGY
    • ARCHIVES
    • CONTACT
    • Advertise

    CODEGEEKZ.COM