Skip to content

Instantly share code, notes, and snippets.

<?php
// Below is a very simple PHP 5 script that implements the RPX token URL processing.
// The code below assumes you have the CURL HTTP fetching library.
$rpxApiKey = 'REPLACE_WITH_YOUR_RPX_API_KEY';
if(isset($_POST['token'])) {
/* STEP 1: Extract token POST parameter */
$token = $_POST['token'];
# This code sample shows how to make the auth_info API call using Python.
import urllib
import urllib2
# json is native in python 2.6, but must be installed for previous versions
import json
# Step 1) Extract the token from your environment. If you are using app engine,
# you'd do something like: