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¬†http://services.groupkt.com/country/search?text=Germany you will see what this returns. You can change the part of the array ‘alpha2_code’ to one of the others

 

Read More

Add http to url if it doesn’t have it

Some times url are being stored in the database without the http so we want to put this to the end user to work properly. You could simply validate the data with the following code:

 

Read More