background preloader

RestFul

Facebook Twitter

Android MySQL PHP & JSON tutorial. How to make REST calls in PHP. Installing SSL using OpenSSL on a WAMP localhost. Image via Wikipedia I’m working on a project that is requiring me to use SSL (to make a https connection) on my local installation of WAMP.

Installing SSL using OpenSSL on a WAMP localhost

After much searching and a couple tries, it appears that I finally got it working. This post should be useful to anyone who is trying to do the same. Before starting with all the key stuff, I installed the OpenSSL binaries for Windows into the System directory. The following is ripped from a comment buried on WampServer.com. Again in the command prompt, go to C:\wamp\Apache2\bin and run the following command: The command runs and prompts you to enter a PEM pass phrase and verify it.

It will then ask you to enter information that will be incorporated into your certificate request. Run the following command: You will be prompted for the pass phrase from the previous step. Run the following command to create a certificate which expires after one year: Create a folder c:\wamp\OpenSSL with the following subfolders: Copy the following files to /certs/:

- PHP, Apache, MySQL, Windows : WampServer. You can follow my guided steps to create working https SSL: ********************Step1****** -> Create SSL Certificate and Key**************** 1a) Open the DOS command window and change directory to bin directory of wamp apache directory by using the DOS command without quotes: "cd /d c:\" and then "cd wamp\bin\apache\apache2.2.8\bin". apache2.2.8 should be changed to what apache folder your wamp server has.

- PHP, Apache, MySQL, Windows : WampServer

After done, the DOS prompt should look like: C:\wamp\bin\apache\apache2.2.8\bin> 1b) Create a server private key with 1024 bits encryption. You should enter this command without quotes:"openssl genrsa -des3 -out server.key 1024". 1d) Create a self-signed Certificate (X509 structure) with the RSA key you just created.

You might combine step1b, 1c and 1d into one step by using this command, no quotes: "openssl req -new -x509 -nodes -out server.crt -keyout server.key" if you have trouble following through. You'll fill in the information after entering this command. Lynda.com search. Calling RESTful services from your Android app. Mobile developer William J.

Calling RESTful services from your Android app

Francis demonstrates how easy it is to consume a RESTful service from your Android device. RESTful services are well suited for providing content to small footprint devices like smartphones and tablets. In fact, if you've interacted with any cloud-based APIs in the last couple of years, there is a strong chance that API was exposed via a REST interface. There are a number of documents available on the web explaining what constitutes a REST service and how to implement one. There are also a number of write-ups explaining how to consume REST services from a client. Recently my son and I released an update for our game, which included an online leaderboard.

Figure A Calling a REST endpoint from within an Android application requires pushing an HTTP request to the background thread and then parsing the results on the UI thread. This tutorial includes a pared down version of the code actually used in my production application. How to Build a RESTful API Web Service with PHP - Across the Stack. When I built my new online portfolio, I knew I wanted to create a RESTful API to easily access my data.

How to Build a RESTful API Web Service with PHP - Across the Stack

Here’s how I did it. I started developing my first API nearly 2 years ago. At that time I couldn’t find any simple examples, so I reverse engineered my experiences as a user of the Twitter and Flickr APIs. Over the years I have refined and distilled my API “template” so that I can add a web service to a site with minimal effort. After I started writing this post I read “Create Your API with Restler” by Richard Askew in the December 2012 issue of .Net magazine. As I started, it was simple enough to create some web service endpoints that would return data, but it took me a while to refine my code so that it would do things like set the correct HTTP Content-Type header, return useful HTTP response codes and provide multiple data formats.

Set Up Your API Development Environment “/api/? Instead of the prettier: Project: Creating A RESTful PHP Web Service With Tonic.