PHP code example of toin0u / http-adapter

1. Go to this page and download the library: Download toin0u/http-adapter library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

toin0u / http-adapter example snippets




ter = new HttpAdapter\CurlHttpAdapter;
$url     = 'http://ifconfig.me/ip';

printf('IP: %s', $adapter->getContent($url)); // IP: 127.0.0.1

bash
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install