PHP code example of initphp / http-factory

1. Go to this page and download the library: Download initphp/http-factory 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/ */

    

initphp / http-factory example snippets


> // Before
> use InitPHP\HTTPFactory\HTTPFactory;
> $factory = new HTTPFactory();
>
> // After
> use InitPHP\HTTP\Factory\Factory;
> $factory = new Factory();
> 


use InitPHP\HTTPFactory\HTTPFactory;

$http = new HTTPFactory();

$request = $http->createRequest('GET', 'https://www.muhammetsafak.com.tr');