The CC PHP-AJAX Chooser is a simple way to add a license chooser to your PHP-based web application. It contains the following components:
The code is available from Subversion as part of the cctools project at SourceForge. You can retrieve the code using the Subversion command-line client using the following command:
Additional information: Subversion
WS_ROOT_URL variable in
js/chooser.js must point to the URL
ws_proxy.php is served from on your server.
The PHP Chooser code can optionally be configured in two ways:
For information on available versions of the web services, see the API documentation. The code in Subversion defaults to the 1.5 version of the web services. To change the version, update the
$WS_ROOT variable in
To configure a proxy for web service calls, edit the the
$USE_PROXY variables in
ws_client.php The proxy server,
$PROXY, should be specified without the
index.php provided with the chooser demonstrates how to create the chooser. There are two functions provided by
html_ui.php which are used in conjunction to create the chooser.
<script>tags for AJAX support. The $base parameter specifies the relative path from the calling page to the
$basehas the same meaning as for scriptHeader;
$defaultsis an optional hash of the default license name and URI.