Skip to main content

Raspberry Pi – Useful commands for your web server

Hello Devz, Here are some simple steps to configure your own web server: INSTALL WORDPRESS sudo mkdir -p /var/www/html/mywebsite cd /var/www/html/mywebsite sudo wget tar –strip-components=1 -xvf latest.tar.gz rm latest.tar.gz sudo chown -R www-data:www-data /var/www/html/mywebsite sudo chmod -R 755 /var/www/html/website KILL THE FIREWALL sudo iptables -F sudo iptables -X sudo iptables -t nat -F sudo […]

Create a simple REST Web Service: Step 3 – Consume the Service

In my previous post we were talking about how to create a REST web service. But now we want to build a client and consume this service. The address was http://localhost/DbUsersApi.php?action=get_user_list and the result was a JSON file: {“user_list”:[{“userid”:”D3B6F994-1DA5-47FB-8A2A-750A65AAB137″,”firstname”:”Joe”,”lastname”:”Bloggs”},{“userid”:”E19F2EC8-62B9-4C88-84DC-E0D6903177E0″,”firstname”:”John”,”lastname”:”Doe”}]} We will use a simple HTML file with Javascript. Consume the service with Javascript: Create a new file […]

Create a simple REST Web Service: Step 2 – PHP Service

In my previous post I was talking about how to install WAMP and create your DataBase. Here we will create a RESTfull web service with PHP. We created our User table with some users in it. Now we want to get this user list in a “universal” way. It means any kind of code could […]

Create a simple REST Web Service: Step 1 – DataBase

Context: Here we want to create a REST Web Service using PHP on a WAMPServer. The messages will be formatted as JSON entities. A Web Service is simply some online methods you can access from any kind of code (C#, Java, Javascript, Python …). RESTful web services are light weight, highly scalable and maintainable and […]