Commit d0a6af8e authored by Esteban Choque's avatar Esteban Choque

Delete limesurvey_connect_2.php

parent 26be976b
Pipeline #1505 failed with stages
<?php
require_once 'jsonRPCClient.php';
define( 'LS_BASEURL', 'https://ctic.gob.bo/formularios/index.php');
define( 'LS_USER', 'esteban.choque' );
define( 'LS_PASSWORD', 'gus2A3iYCgZUwiRjx8JBg8FgRuTWi2Pu' );
$iSurveyID_org = 13127;
$sNewname = 'Copy of survey 13127';
if(ctype_alnum($iSurveyID_org) && strlen($iSurveyID_org == 6)) { // Valid SID format
// Instantiate a new RPC client
$myJSONRPCClient = new jsonRPCClient( LS_BASEURL.'/admin/remotecontrol' );
// Get a session key
$sSessionKey= $myJSONRPCClient->get_session_key( LS_USER, LS_PASSWORD );
if(is_array($sSessionKey)) { // Invalid session
echo $sSessionKey['status'];
}
else if($sSessionKey) { // Valid session
// Copy survey
$newSurvey = $myJSONRPCClient->copy_survey($sSessionKey, $iSurveyID_org, $sNewname);
// Print results
print_r($newSurvey);
}
// Release the session key
$myJSONRPCClient->release_session_key( $sSessionKey );
}
else { // Invalid SID format
die( 'Invalid format!' );
}
?>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment