PHP code example of roshangara / webservice

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

    

roshangara / webservice example snippets

bash
 $webservice = new \Roshangara\Webservice\Webservice();

    $webservice
        ->setMethod('get')
        ->setUrl('https://restcountries.eu/rest/v2/')
        ->setFunction('all')
        ->setParam('fullText', 'true')
        ->send();
        
    \\ get array result
    $webservice->getResult();