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


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

Quick code to send email from the server

The following code will help you to know if you can send email from your server or not.

  Open a notepad or textEdit (on OS X) and save it as PHP, upload it to your server and access or execute the file.

Read More