pages.get_one Test Start

Subclass Constructor called....
Constructor called....

pages.get_one example

Start New Pages Get One

Fullname: methods:categories-select
Created At: 2012-08-31T15:06:48+00:00
Created By: Jerad Whitaker
Updated At: 2012-09-05T18:11:19+00:00
Updated By: Jerad Whitaker
Parent Fullname: methods:_start
Rating: 0
Revisions: 27
Page Title: API Methods
Children: 0
Content: Page content is hidden on this site.
Comments: 0
Commented At:
Commented By:

Page HTML Below

Select all categories from given site
argument keys:

returns: list of category names

This demo uses the sample code below. Create a separate file in your hosted site. Change the path to the and files. Replace the all caps USERNAME, API KEY, and SITENAME with values specific to you and your site.

Sample Code

//set globals before includes
    $newdebuglevel = 0;    
//add includes
//change path to your server location
//set startup parameters for xmlrpc
//change path to your server location
    $GLOBALS ['xmlrpc_null_extension' ] = true;
    $ServerPath = "xml-rpc-api.php";
    $ServerHostName = "";
    $ServerPort = "";
//create a client for your site
    $Client = new xmlrpc_client($ServerPath,$ServerHostName,$ServerPort);
    $Client->setCredentials("USERNAME","API KEY");
    $Client->return_type = "phpvals"; //forces return as php values
    $SiteName = "SITENAME";
////////////test code
////////////code doesn't include error checking
    $siteobj = new WikidotSite($SiteName, $Client);
    $returnarray = array();
    echo "<h3> example</h3></br><hr>";
    $siteobj->php_categories_select($SiteName, $returnarray);
    foreach($returnarray as $key => $data){
        echo $key.": ".$data."</br>";}

Download Code File

Live demo

Uses above code in an Iframe from a PHP host.

Subclass Destructor called....