PHP CURL The Basics Getting started; Before getting started with curl and php we must ensure that we have the extension installed. package name on linux is php-curl; Now we can use php-curl in our php code, like this for a simple GET call; <?php // URL requested $url = 'http://www.yourdomain.com/endpoint'; // Initializing curl request $ch = curl_init( $url ); // Configuring curl options $options = array( CURLOPT_RETURNTRANSFER => true ); // Setting curl options curl_setopt_array( $ch, $options ); // Getting results by executing the curl request. $result = curl_exec($ch); // dump the content var_dump($result); Posting to an endpoint using php-curl There are situations where you may need to post some type of data into an endpoint which may or maynot be protected by authentication, here is a simple example that cover this situation. <?php // JSON URL requested $json_url = ‘http://www.yourdomain.com/json_script.json’; // Initializing curl request $c...