PHP code example of mohiwalla / php-fetch

1. Go to this page and download the library: Download mohiwalla/php-fetch 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/ */

    

mohiwalla / php-fetch example snippets



$res = fetch('https://dummyjson.com/users/1');
$data = json_decode($res);

echo print_r($data, true);