How to easily consume a web service through REST on PHP

Example: We need to get the ISO country code which is for Germany = DE. If you access to the site you will see what this returns. You can change the part of the array ‘alpha2_code’ to one of the others