pages.save_one Test Start

setCredentials("USERNAME","API KEY"); $Client->setDebug($newdebuglevel); $Client->setSSLVerifyPeer(false); $Client->setSSLVerifyHost(false); $Client->return_type = "phpvals"; //forces return of page.get_one as php values $SiteName = "SITENAME"; ////////////test code ////////////code doesn't include error checking $pageobj = new WikidotPage($SiteName, $Client); $returnarray = array(); echo "

pages.save_one example



"; $savepage = "CATEGORY:NEWPAGENAME"; $savepagetitle = "New Test Page"; $tags = array("Tom", "Dick", "Harry"); $pageobj->setPage($savepage); $pageobj->setTags($tags); $pageobj->setParentFullname("CATEGORY:PARENT"); //optional $pageobj->setTitle($savepagetitle); $pageobj->setContent("New page stuff\nSecond line of stuff"); if($pageobj->php_pages_save_one("create_or_update")){ echo "Success
";} ?>