Version Description
- Updated AWS lib to 1.4.4
- use my own dropbox lib again and chaned it to new api
- Fixed security vulnerability
- some littel fixes
Download this release
Release Info
Developer | danielhuesken |
Plugin | BackWPup – WordPress Backup Plugin |
Version | 2.1.5 |
Comparing to | |
See all releases |
Code changes from version 2.1.4 to 2.1.5
- backwpup-functions.php +15 -26
- backwpup.php +4 -4
- job/dest_dropbox.php +12 -24
- job/show_working.php +7 -5
- job/wp_export_generate.php +5 -4
- libs/Dropbox/API.php +0 -345
- libs/Dropbox/Exception.php +0 -15
- libs/Dropbox/Exception/Forbidden.php +0 -18
- libs/Dropbox/Exception/NotFound.php +0 -20
- libs/Dropbox/Exception/OverQuota.php +0 -20
- libs/Dropbox/Exception/RequestToken.php +0 -18
- libs/Dropbox/OAuth.php +0 -151
- libs/Dropbox/OAuth/Curl.php +0 -281
- libs/Dropbox/OAuth/PEAR.php +0 -170
- libs/Dropbox/OAuth/PHP.php +0 -147
- libs/Dropbox/OAuth/Wordpress.php +0 -223
- libs/Dropbox/OAuth/Zend.php +0 -244
- libs/Dropbox/autoload.php +0 -29
- libs/aws/lib/requestcore/cacert.pem +112 -378
- libs/aws/sdk.class.php +16 -13
- libs/aws/services/as.class.php +1 -1
- libs/aws/services/cloudformation.class.php +57 -2
- libs/aws/services/cloudwatch.class.php +1 -1
- libs/aws/services/ec2.class.php +2 -2
- libs/aws/services/elasticache.class.php +585 -0
- libs/aws/services/elasticbeanstalk.class.php +1 -1
- libs/aws/services/elb.class.php +312 -187
- libs/aws/services/emr.class.php +94 -27
- libs/aws/services/iam.class.php +1 -1
- libs/aws/services/importexport.class.php +1 -1
- libs/aws/services/rds.class.php +1 -1
- libs/aws/services/s3.class.php +26 -1
- libs/aws/services/ses.class.php +1 -1
- libs/aws/services/sns.class.php +1 -1
- libs/aws/services/sqs.class.php +1 -1
- libs/aws/services/sts.class.php +1 -1
- libs/aws/utilities/hadoopbootstrap.class.php +127 -0
- libs/dropbox.php +677 -0
- pages/func_backwpupbackups.php +5 -7
- pages/func_backwpupeditjob.php +1 -1
- pages/header_backwpupbackups.php +11 -12
- pages/header_backwpupeditjob.php +14 -16
- readme.txt +7 -1
- uninstall.php +1 -1
backwpup-functions.php
CHANGED
@@ -174,7 +174,6 @@ function backwpup_plugin_deactivate() {
|
|
174 |
$cfg=get_option('backwpup');
|
175 |
$cfg['last_activate']=''; //set to not activated
|
176 |
update_option('backwpup',$cfg);
|
177 |
-
backwpup_api(false);
|
178 |
}
|
179 |
|
180 |
//get temp dir
|
@@ -182,56 +181,46 @@ function backwpup_get_temp() {
|
|
182 |
//get temp dirs like wordpress get_temp_dir()
|
183 |
if (defined('WP_TEMP_DIR'))
|
184 |
$tempfolder=WP_TEMP_DIR;
|
185 |
-
if (empty($tempfolder) or !backwpup_check_open_basedir($tempfolder) or
|
186 |
$tempfolder=sys_get_temp_dir(); //normal temp dir
|
187 |
-
if (empty($tempfolder) or !backwpup_check_open_basedir($tempfolder) or
|
188 |
$tempfolder=ini_get('upload_tmp_dir'); //if sys_get_temp_dir not work
|
189 |
-
if (empty($tempfolder) or !backwpup_check_open_basedir($tempfolder) or
|
190 |
$tempfolder=WP_CONTENT_DIR.'/';
|
191 |
-
if (empty($tempfolder) or !backwpup_check_open_basedir($tempfolder) or
|
192 |
$tempfolder=get_temp_dir();
|
193 |
-
return rtrim(str_replace('\\','/',realpath(trim($tempfolder))),'/').'/.backwpup_'.crc32(ABSPATH).'/';
|
194 |
}
|
195 |
//checks the dir is in openbasedir
|
196 |
function backwpup_check_open_basedir($dir) {
|
197 |
-
|
|
|
|
|
198 |
$dir=rtrim(str_replace('\\','/',$dir),'/').'/';
|
199 |
-
if (!empty($
|
200 |
-
$openbasedirarray=explode(PATH_SEPARATOR,$openbasedir);
|
201 |
foreach ($openbasedirarray as $basedir) {
|
202 |
if (stripos($dir,rtrim(str_replace('\\','/',$basedir),'/').'/')==0)
|
203 |
return true;
|
204 |
}
|
205 |
-
}
|
206 |
-
return true;
|
207 |
-
}
|
208 |
return false;
|
209 |
}
|
210 |
|
211 |
//Backwpup API
|
212 |
-
function backwpup_api(
|
213 |
global $wp_version;
|
214 |
$cfg=get_option('backwpup');
|
215 |
-
if ($active)
|
216 |
-
$post['ACTIVE']='Y';
|
217 |
-
else
|
218 |
-
$post['ACTIVE']='N';
|
219 |
-
if (is_multisite())
|
220 |
-
$post['ACTIVE']='M';
|
221 |
$blugurl=get_option('siteurl');
|
222 |
if (defined('WP_SITEURL'))
|
223 |
$blugurl=WP_SITEURL;
|
224 |
-
|
225 |
$post['URL']=$blugurl;
|
226 |
$post['WP_VER']=$wp_version;
|
227 |
$post['BACKWPUP_VER']=BACKWPUP_VERSION;
|
228 |
-
if (!empty($cfg['apicronservice']))
|
|
|
229 |
$post['OFFSET']=get_option('gmt_offset');
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
$cfg=get_option('backwpup'); //Load Settings
|
234 |
-
if ($cfg['apicronservice']) {
|
235 |
$jobs=get_option('backwpup_jobs');
|
236 |
if (!empty($jobs)) {
|
237 |
foreach ($jobs as $jobid => $jobvalue) {
|
174 |
$cfg=get_option('backwpup');
|
175 |
$cfg['last_activate']=''; //set to not activated
|
176 |
update_option('backwpup',$cfg);
|
|
|
177 |
}
|
178 |
|
179 |
//get temp dir
|
181 |
//get temp dirs like wordpress get_temp_dir()
|
182 |
if (defined('WP_TEMP_DIR'))
|
183 |
$tempfolder=WP_TEMP_DIR;
|
184 |
+
if (empty($tempfolder) or !backwpup_check_open_basedir($tempfolder) or !@is_writable($tempfolder) or !@is_dir($tempfolder))
|
185 |
$tempfolder=sys_get_temp_dir(); //normal temp dir
|
186 |
+
if (empty($tempfolder) or !backwpup_check_open_basedir($tempfolder) or !@is_writable($tempfolder) or !@is_dir($tempfolder))
|
187 |
$tempfolder=ini_get('upload_tmp_dir'); //if sys_get_temp_dir not work
|
188 |
+
if (empty($tempfolder) or !backwpup_check_open_basedir($tempfolder) or !@is_writable($tempfolder) or !is_dir($tempfolder))
|
189 |
$tempfolder=WP_CONTENT_DIR.'/';
|
190 |
+
if (empty($tempfolder) or !backwpup_check_open_basedir($tempfolder) or !@is_writable($tempfolder) or !@is_dir($tempfolder))
|
191 |
$tempfolder=get_temp_dir();
|
192 |
+
return rtrim(str_replace('\\','/',realpath(trim($tempfolder))),'/').'/.backwpup_'.substr(crc32(ABSPATH),1).'/';
|
193 |
}
|
194 |
//checks the dir is in openbasedir
|
195 |
function backwpup_check_open_basedir($dir) {
|
196 |
+
if (!ini_get('open_basedir'))
|
197 |
+
return true;
|
198 |
+
$openbasedirarray=explode(PATH_SEPARATOR,ini_get('open_basedir'));
|
199 |
$dir=rtrim(str_replace('\\','/',$dir),'/').'/';
|
200 |
+
if (!empty($openbasedirarray)) {
|
|
|
201 |
foreach ($openbasedirarray as $basedir) {
|
202 |
if (stripos($dir,rtrim(str_replace('\\','/',$basedir),'/').'/')==0)
|
203 |
return true;
|
204 |
}
|
205 |
+
}
|
|
|
|
|
206 |
return false;
|
207 |
}
|
208 |
|
209 |
//Backwpup API
|
210 |
+
function backwpup_api() {
|
211 |
global $wp_version;
|
212 |
$cfg=get_option('backwpup');
|
|
|
|
|
|
|
|
|
|
|
|
|
213 |
$blugurl=get_option('siteurl');
|
214 |
if (defined('WP_SITEURL'))
|
215 |
$blugurl=WP_SITEURL;
|
|
|
216 |
$post['URL']=$blugurl;
|
217 |
$post['WP_VER']=$wp_version;
|
218 |
$post['BACKWPUP_VER']=BACKWPUP_VERSION;
|
219 |
+
if (!empty($cfg['apicronservice'])) {
|
220 |
+
$post['ACTION']='cronupdate';
|
221 |
$post['OFFSET']=get_option('gmt_offset');
|
222 |
+
if (!empty($cfg['apicronservice']) and !empty($cfg['httpauthuser']) and !empty($cfg['httpauthpassword']))
|
223 |
+
$post['httpauth']=base64_encode($cfg['httpauthuser'].':'.base64_decode($cfg['httpauthpassword']));
|
|
|
|
|
|
|
224 |
$jobs=get_option('backwpup_jobs');
|
225 |
if (!empty($jobs)) {
|
226 |
foreach ($jobs as $jobid => $jobvalue) {
|
backwpup.php
CHANGED
@@ -4,7 +4,7 @@ Plugin Name: BackWPup
|
|
4 |
Plugin URI: http://backwpup.com
|
5 |
Description: WordPress Backup and more...
|
6 |
Author: Daniel Hüsken
|
7 |
-
Version: 2.1.
|
8 |
Author URI: http://danielhuesken.de
|
9 |
Text Domain: backwpup
|
10 |
Domain Path: /lang/
|
@@ -32,7 +32,7 @@ Domain Path: /lang/
|
|
32 |
define('BACKWPUP_PLUGIN_BASEDIR', dirname(plugin_basename(__FILE__)));
|
33 |
define('BACKWPUP_PLUGIN_BASEURL',plugins_url('',__FILE__));
|
34 |
//Set Plugin Version
|
35 |
-
define('BACKWPUP_VERSION', '2.1.
|
36 |
//Set Min Wordpress Version
|
37 |
define('BACKWPUP_MIN_WORDPRESS_VERSION', '3.1');
|
38 |
//Set User Capability
|
@@ -40,7 +40,7 @@ define('BACKWPUP_USER_CAPABILITY', 'export');
|
|
40 |
//Set useable destinations
|
41 |
if (!defined('BACKWPUP_DESTS')) {
|
42 |
if (!function_exists('curl_init'))
|
43 |
-
define('BACKWPUP_DESTS', 'FTP,
|
44 |
else
|
45 |
define('BACKWPUP_DESTS', 'FTP,DROPBOX,SUGARSYNC,S3,GSTORAGE,RSC,MSAZURE');
|
46 |
}
|
@@ -51,7 +51,7 @@ define('BACKWPUP_DROPBOX_APP_SECRET', 't5hlbxtz473hchy');
|
|
51 |
define('BACKWPUP_SUGARSYNC_ACCESSKEY', 'OTcwNjc5MTI5OTQxMzY1Njc5OA');
|
52 |
define('BACKWPUP_SUGARSYNC_PRIVATEACCESSKEY', 'NzNmNDMwMDBiNTkwNDY0YzhjY2JiN2E5YWVkMjFmYmI');
|
53 |
//BackWPup API url
|
54 |
-
define('BACKWPUP_API_URL', '
|
55 |
//use Cert in AWS dir
|
56 |
define('AWS_CERTIFICATE_AUTHORITY', true);
|
57 |
//load Text Domain
|
4 |
Plugin URI: http://backwpup.com
|
5 |
Description: WordPress Backup and more...
|
6 |
Author: Daniel Hüsken
|
7 |
+
Version: 2.1.5
|
8 |
Author URI: http://danielhuesken.de
|
9 |
Text Domain: backwpup
|
10 |
Domain Path: /lang/
|
32 |
define('BACKWPUP_PLUGIN_BASEDIR', dirname(plugin_basename(__FILE__)));
|
33 |
define('BACKWPUP_PLUGIN_BASEURL',plugins_url('',__FILE__));
|
34 |
//Set Plugin Version
|
35 |
+
define('BACKWPUP_VERSION', '2.1.5');
|
36 |
//Set Min Wordpress Version
|
37 |
define('BACKWPUP_MIN_WORDPRESS_VERSION', '3.1');
|
38 |
//Set User Capability
|
40 |
//Set useable destinations
|
41 |
if (!defined('BACKWPUP_DESTS')) {
|
42 |
if (!function_exists('curl_init'))
|
43 |
+
define('BACKWPUP_DESTS', 'FTP,MSAZURE');
|
44 |
else
|
45 |
define('BACKWPUP_DESTS', 'FTP,DROPBOX,SUGARSYNC,S3,GSTORAGE,RSC,MSAZURE');
|
46 |
}
|
51 |
define('BACKWPUP_SUGARSYNC_ACCESSKEY', 'OTcwNjc5MTI5OTQxMzY1Njc5OA');
|
52 |
define('BACKWPUP_SUGARSYNC_PRIVATEACCESSKEY', 'NzNmNDMwMDBiNTkwNDY0YzhjY2JiN2E5YWVkMjFmYmI');
|
53 |
//BackWPup API url
|
54 |
+
define('BACKWPUP_API_URL', 'https://api.backwpup.com');
|
55 |
//use Cert in AWS dir
|
56 |
define('AWS_CERTIFICATE_AUTHORITY', true);
|
57 |
//load Text Domain
|
job/dest_dropbox.php
CHANGED
@@ -5,25 +5,14 @@ function dest_dropbox() {
|
|
5 |
$WORKING['STEPDONE']=0;
|
6 |
trigger_error(sprintf(__('%d. Try to sending backup file to DropBox...','backwpup'),$WORKING['DEST_DROPBOX']['STEP_TRY']),E_USER_NOTICE);
|
7 |
|
8 |
-
require_once(realpath(dirname(__FILE__).'/../libs/
|
9 |
try {
|
10 |
-
|
11 |
-
|
12 |
-
elseif (class_exists('HTTP_OAuth_Consumer'))
|
13 |
-
$oauth = new Dropbox_OAuth_PEAR($STATIC['BACKWPUP']['DROPBOX_APP_KEY'], $STATIC['BACKWPUP']['DROPBOX_APP_SECRET']);
|
14 |
-
elseif (class_exists('Zend_Oauth_Consumer'))
|
15 |
-
$oauth = new Dropbox_OAuth_Zend($STATIC['BACKWPUP']['DROPBOX_APP_KEY'], $STATIC['BACKWPUP']['DROPBOX_APP_SECRET']);
|
16 |
-
elseif (function_exists('curl_exec'))
|
17 |
-
$oauth = new Dropbox_OAuth_Curl($STATIC['BACKWPUP']['DROPBOX_APP_KEY'], $STATIC['BACKWPUP']['DROPBOX_APP_SECRET']);
|
18 |
-
else {
|
19 |
-
trigger_error(sprintf(__('No supported DropDox oauth class found!','backwpup'),$info['display_name']),E_USER_ERROR);
|
20 |
-
return;
|
21 |
-
}
|
22 |
|
23 |
-
$dropbox = new Dropbox_API($oauth,$STATIC['JOB']['droperoot']);
|
24 |
// set the tokens
|
25 |
-
$
|
26 |
-
$info=$dropbox->
|
27 |
if (!empty($info['uid'])) {
|
28 |
trigger_error(sprintf(__('Authed with DropBox from %s','backwpup'),$info['display_name']),E_USER_NOTICE);
|
29 |
}
|
@@ -37,26 +26,25 @@ function dest_dropbox() {
|
|
37 |
trigger_error(sprintf(__('%s free on DropBox','backwpup'),formatBytes($dropboxfreespase)),E_USER_NOTICE);
|
38 |
}
|
39 |
//set calback function
|
40 |
-
$
|
41 |
// put the file
|
42 |
trigger_error(__('Upload to DropBox now started... ','backwpup'),E_USER_NOTICE);
|
43 |
-
|
44 |
-
|
45 |
-
if ($response) {
|
46 |
$STATIC['JOB']['lastbackupdownloadurl']=$STATIC['WP']['ADMINURL'].'?page=backwpupbackups&action=downloaddropbox&file='.$STATIC['JOB']['dropedir'].$STATIC['backupfile'].'&jobid='.$STATIC['JOB']['jobid'];
|
47 |
$WORKING['STEPDONE']++;
|
48 |
$WORKING['STEPSDONE'][]='DEST_DROPBOX'; //set done
|
49 |
-
trigger_error(sprintf(__('Backup transferred to %s','backwpup'),'https://api-content.dropbox.com/
|
50 |
}
|
51 |
//unset calback function
|
52 |
-
$
|
53 |
} catch (Exception $e) {
|
54 |
trigger_error(sprintf(__('DropBox API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
|
55 |
}
|
56 |
try {
|
57 |
if ($STATIC['JOB']['dropemaxbackups']>0 and is_object($dropbox)) { //Delete old backups
|
58 |
$backupfilelist=array();
|
59 |
-
$metadata = $dropbox->
|
60 |
if (is_array($metadata)) {
|
61 |
foreach ($metadata['contents'] as $data) {
|
62 |
$file=basename($data['path']);
|
@@ -68,7 +56,7 @@ function dest_dropbox() {
|
|
68 |
rsort($backupfilelist);
|
69 |
$numdeltefiles=0;
|
70 |
for ($i=$STATIC['JOB']['dropemaxbackups'];$i<count($backupfilelist);$i++) {
|
71 |
-
$dropbox->
|
72 |
$numdeltefiles++;
|
73 |
}
|
74 |
if ($numdeltefiles>0)
|
5 |
$WORKING['STEPDONE']=0;
|
6 |
trigger_error(sprintf(__('%d. Try to sending backup file to DropBox...','backwpup'),$WORKING['DEST_DROPBOX']['STEP_TRY']),E_USER_NOTICE);
|
7 |
|
8 |
+
require_once(realpath(dirname(__FILE__).'/../libs/dropbox.php'));
|
9 |
try {
|
10 |
+
//set boxtype and authkeys
|
11 |
+
$dropbox = new backwpup_Dropbox($STATIC['BACKWPUP']['DROPBOX_APP_KEY'], $STATIC['BACKWPUP']['DROPBOX_APP_SECRET']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
|
|
13 |
// set the tokens
|
14 |
+
$dropbox->setOAuthTokens($STATIC['JOB']['dropetoken'],$STATIC['JOB']['dropesecret']);
|
15 |
+
$info=$dropbox->accountInfo();
|
16 |
if (!empty($info['uid'])) {
|
17 |
trigger_error(sprintf(__('Authed with DropBox from %s','backwpup'),$info['display_name']),E_USER_NOTICE);
|
18 |
}
|
26 |
trigger_error(sprintf(__('%s free on DropBox','backwpup'),formatBytes($dropboxfreespase)),E_USER_NOTICE);
|
27 |
}
|
28 |
//set calback function
|
29 |
+
$dropbox->setProgressFunction='curl_progresscallback';
|
30 |
// put the file
|
31 |
trigger_error(__('Upload to DropBox now started... ','backwpup'),E_USER_NOTICE);
|
32 |
+
$response = $dropbox->upload($STATIC['JOB']['backupdir'].$STATIC['backupfile'],$STATIC['JOB']['dropedir']);
|
33 |
+
if ($response['bytes']==filesize($STATIC['JOB']['backupdir'].$STATIC['backupfile'])) {
|
|
|
34 |
$STATIC['JOB']['lastbackupdownloadurl']=$STATIC['WP']['ADMINURL'].'?page=backwpupbackups&action=downloaddropbox&file='.$STATIC['JOB']['dropedir'].$STATIC['backupfile'].'&jobid='.$STATIC['JOB']['jobid'];
|
35 |
$WORKING['STEPDONE']++;
|
36 |
$WORKING['STEPSDONE'][]='DEST_DROPBOX'; //set done
|
37 |
+
trigger_error(sprintf(__('Backup transferred to %s','backwpup'),'https://api-content.dropbox.com/1/files/'.$STATIC['JOB']['droperoot'].'/'.$STATIC['JOB']['dropedir'].$STATIC['backupfile']),E_USER_NOTICE);
|
38 |
}
|
39 |
//unset calback function
|
40 |
+
$dropbox->setProgressFunction='';
|
41 |
} catch (Exception $e) {
|
42 |
trigger_error(sprintf(__('DropBox API: %s','backwpup'),$e->getMessage()),E_USER_ERROR);
|
43 |
}
|
44 |
try {
|
45 |
if ($STATIC['JOB']['dropemaxbackups']>0 and is_object($dropbox)) { //Delete old backups
|
46 |
$backupfilelist=array();
|
47 |
+
$metadata = $dropbox->metadata($STATIC['JOB']['dropedir']);
|
48 |
if (is_array($metadata)) {
|
49 |
foreach ($metadata['contents'] as $data) {
|
50 |
$file=basename($data['path']);
|
56 |
rsort($backupfilelist);
|
57 |
$numdeltefiles=0;
|
58 |
for ($i=$STATIC['JOB']['dropemaxbackups'];$i<count($backupfilelist);$i++) {
|
59 |
+
$dropbox->fileopsDelete($STATIC['JOB']['dropedir'].$backupfilelist[$i]); //delete files on Cloud
|
60 |
$numdeltefiles++;
|
61 |
}
|
62 |
if ($numdeltefiles>0)
|
job/show_working.php
CHANGED
@@ -61,16 +61,18 @@ function backwpup_read_logheader($logfile) {
|
|
61 |
return $joddata;
|
62 |
}
|
63 |
|
64 |
-
|
65 |
-
|
|
|
|
|
66 |
|
67 |
// check given file is a backwpup logfile
|
68 |
-
if (substr(trim($_POST['logfile']),-3)!='.gz' and substr(
|
69 |
die();
|
70 |
|
71 |
$log='';
|
72 |
-
if (is_file(
|
73 |
-
if (is_file(
|
74 |
if ($infile=backwpup_get_working_file()) {
|
75 |
$warnings=$infile['WORKING']['WARNING'];
|
76 |
$errors=$infile['WORKING']['ERROR'];
|
61 |
return $joddata;
|
62 |
}
|
63 |
|
64 |
+
$_POST['logfile']=trim(str_replace(array('://','@','../'),'',$_POST['logfile']));
|
65 |
+
$_POST['BackWPupJobTemp']=trim(str_replace(array('://','@','../'),'',$_POST['BackWPupJobTemp']));
|
66 |
+
if (is_file($_POST['logfile'].'.gz'))
|
67 |
+
$_POST['logfile']=$_POST['logfile'].'.gz';
|
68 |
|
69 |
// check given file is a backwpup logfile
|
70 |
+
if (substr(trim($_POST['logfile']),-3)!='.gz' and substr($_POST['logfile'],-8)!='.html.gz' and substr($_POST['logfile'],0,13)!='backwpup_log_' and strlen($_POST['logfile'])>40 and strlen($_POST['logfile'])<37)
|
71 |
die();
|
72 |
|
73 |
$log='';
|
74 |
+
if (is_file($_POST['logfile'])) {
|
75 |
+
if (is_file($_POST['BackWPupJobTemp'].'.running')) {
|
76 |
if ($infile=backwpup_get_working_file()) {
|
77 |
$warnings=$infile['WORKING']['WARNING'];
|
78 |
$errors=$infile['WORKING']['ERROR'];
|
job/wp_export_generate.php
CHANGED
@@ -6,14 +6,15 @@ define('DONOTCDN', true);
|
|
6 |
define('DONOTCACHCEOBJECT', true);
|
7 |
define('W3TC_IN_MINIFY',false); //W3TC will not loaded
|
8 |
|
9 |
-
|
|
|
10 |
$runningfile=file_get_contents(trim($_POST['BackWPupJobTemp']).'.running');
|
11 |
$infile=array();
|
12 |
if (!empty($runningfile))
|
13 |
$infile=unserialize(trim($runningfile));
|
14 |
-
if (
|
15 |
-
require_once($infile['ABSPATH'].'wp-load.php'); /** Setup WordPress environment */
|
16 |
-
require_once($infile['ABSPATH'].'wp-admin/includes/export.php');
|
17 |
export_wp();
|
18 |
}
|
19 |
?>
|
6 |
define('DONOTCACHCEOBJECT', true);
|
7 |
define('W3TC_IN_MINIFY',false); //W3TC will not loaded
|
8 |
|
9 |
+
$_POST['BackWPupJobTemp']=str_replace(array('://','@','../'),'',$_POST['BackWPupJobTemp']);
|
10 |
+
if (is_file(trim($_POST['BackWPupJobTemp']).'.running'))
|
11 |
$runningfile=file_get_contents(trim($_POST['BackWPupJobTemp']).'.running');
|
12 |
$infile=array();
|
13 |
if (!empty($runningfile))
|
14 |
$infile=unserialize(trim($runningfile));
|
15 |
+
if (is_file(trim($infile['ABSPATH']).'wp-load.php') and $_POST['nonce']==$infile['WORKING']['NONCE'] and $_POST['type']=='getxmlexport') {
|
16 |
+
require_once(trim($infile['ABSPATH']).'wp-load.php'); /** Setup WordPress environment */
|
17 |
+
require_once(trim($infile['ABSPATH']).'wp-admin/includes/export.php');
|
18 |
export_wp();
|
19 |
}
|
20 |
?>
|
libs/Dropbox/API.php
DELETED
@@ -1,345 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox API class
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
class Dropbox_API {
|
12 |
-
|
13 |
-
/**
|
14 |
-
* Sandbox root-path
|
15 |
-
*/
|
16 |
-
const ROOT_SANDBOX = 'sandbox';
|
17 |
-
|
18 |
-
/**
|
19 |
-
* Dropbox root-path
|
20 |
-
*/
|
21 |
-
const ROOT_DROPBOX = 'dropbox';
|
22 |
-
|
23 |
-
/**
|
24 |
-
* OAuth object
|
25 |
-
*
|
26 |
-
* @var Dropbox_OAuth
|
27 |
-
*/
|
28 |
-
protected $oauth;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Default root-path, this will most likely be 'sandbox' or 'dropbox'
|
32 |
-
*
|
33 |
-
* @var string
|
34 |
-
*/
|
35 |
-
protected $root;
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Constructor
|
39 |
-
*
|
40 |
-
* @param Dropbox_OAuth Dropbox_Auth object
|
41 |
-
* @param string $root default root path (sandbox or dropbox)
|
42 |
-
*/
|
43 |
-
public function __construct(Dropbox_OAuth $oauth, $root = self::ROOT_DROPBOX) {
|
44 |
-
|
45 |
-
$this->oauth = $oauth;
|
46 |
-
$this->root = $root;
|
47 |
-
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Returns OAuth tokens based on an email address and passwords
|
52 |
-
*
|
53 |
-
* This can be used to bypass the regular oauth workflow.
|
54 |
-
*
|
55 |
-
* This method returns an array with 2 elements:
|
56 |
-
* * token
|
57 |
-
* * secret
|
58 |
-
*
|
59 |
-
* @param string $email
|
60 |
-
* @param string $password
|
61 |
-
* @return array
|
62 |
-
*/
|
63 |
-
public function getToken($email, $password) {
|
64 |
-
|
65 |
-
$data = $this->oauth->fetch('http://api.dropbox.com/0/token', array(
|
66 |
-
'email' => $email,
|
67 |
-
'password' => $password
|
68 |
-
),'POST');
|
69 |
-
|
70 |
-
$data = json_decode($data['body']);
|
71 |
-
return array(
|
72 |
-
'token' => $data->token,
|
73 |
-
'token_secret' => $data->secret,
|
74 |
-
);
|
75 |
-
|
76 |
-
}
|
77 |
-
|
78 |
-
/**
|
79 |
-
* Returns information about the current dropbox account
|
80 |
-
*
|
81 |
-
* @return stdclass
|
82 |
-
*/
|
83 |
-
public function getAccountInfo() {
|
84 |
-
|
85 |
-
$data = $this->oauth->fetch('http://api.dropbox.com/0/account/info');
|
86 |
-
return json_decode($data['body'],true);
|
87 |
-
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Creates a new Dropbox account
|
92 |
-
*
|
93 |
-
* @param string $email
|
94 |
-
* @param string $first_name
|
95 |
-
* @param string $last_name
|
96 |
-
* @param string $password
|
97 |
-
* @return bool
|
98 |
-
*/
|
99 |
-
public function createAccount($email, $first_name, $last_name, $password) {
|
100 |
-
|
101 |
-
$result = $this->oauth->fetch('http://api.dropbox.com/0/account',array(
|
102 |
-
'email' => $email,
|
103 |
-
'first_name' => $first_name,
|
104 |
-
'last_name' => $last_name,
|
105 |
-
'password' => $password,
|
106 |
-
), 'POST');
|
107 |
-
|
108 |
-
return $result['body']==='OK';
|
109 |
-
|
110 |
-
}
|
111 |
-
|
112 |
-
|
113 |
-
/**
|
114 |
-
* Returns a file's contents
|
115 |
-
*
|
116 |
-
* @param string $path path
|
117 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
118 |
-
* @return string
|
119 |
-
*/
|
120 |
-
public function getFile($path = '', $root = null) {
|
121 |
-
|
122 |
-
if (is_null($root)) $root = $this->root;
|
123 |
-
$path = implode("/", array_map('rawurlencode', explode("/", $path)));
|
124 |
-
$result = $this->oauth->fetch('http://api-content.dropbox.com/0/files/' . $root . '/' . ltrim($path,'/'));
|
125 |
-
return $result['body'];
|
126 |
-
|
127 |
-
}
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Uploads a new file
|
131 |
-
*
|
132 |
-
* @param string $path Target path (including filename)
|
133 |
-
* @param string $file Either a path to a file or a stream resource
|
134 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
135 |
-
* @return bool
|
136 |
-
*/
|
137 |
-
public function putFile($path, $file, $root = null) {
|
138 |
-
|
139 |
-
$directory = dirname($path);
|
140 |
-
$filename = basename($path);
|
141 |
-
|
142 |
-
if($directory==='.') $directory = '';
|
143 |
-
if (is_null($root)) $root = $this->root;
|
144 |
-
|
145 |
-
if (is_string($file)) {
|
146 |
-
|
147 |
-
$file = fopen($file,'r');
|
148 |
-
|
149 |
-
} elseif (!is_resource($file)) {
|
150 |
-
throw new Dropbox_Exception('File must be a file-resource or a string');
|
151 |
-
}
|
152 |
-
$result=$this->multipartFetch('http://api-content.dropbox.com/0/files/' .
|
153 |
-
$root . '/' . trim($directory,'/'), $file, $filename);
|
154 |
-
|
155 |
-
if(!isset($result["httpStatus"]) || $result["httpStatus"] != 200)
|
156 |
-
throw new Dropbox_Exception("Uploading file to Dropbox failed");
|
157 |
-
|
158 |
-
return true;
|
159 |
-
}
|
160 |
-
|
161 |
-
|
162 |
-
/**
|
163 |
-
* Copies a file or directory from one location to another
|
164 |
-
*
|
165 |
-
* This method returns the file information of the newly created file.
|
166 |
-
*
|
167 |
-
* @param string $from source path
|
168 |
-
* @param string $to destination path
|
169 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
170 |
-
* @return stdclass
|
171 |
-
*/
|
172 |
-
public function copy($from, $to, $root = null) {
|
173 |
-
|
174 |
-
if (is_null($root)) $root = $this->root;
|
175 |
-
$response = $this->oauth->fetch('http://api.dropbox.com/0/fileops/copy', array('from_path' => $from, 'to_path' => $to, 'root' => $root));
|
176 |
-
|
177 |
-
return json_decode($response['body'],true);
|
178 |
-
|
179 |
-
}
|
180 |
-
|
181 |
-
/**
|
182 |
-
* Creates a new folder
|
183 |
-
*
|
184 |
-
* This method returns the information from the newly created directory
|
185 |
-
*
|
186 |
-
* @param string $path
|
187 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
188 |
-
* @return stdclass
|
189 |
-
*/
|
190 |
-
public function createFolder($path, $root = null) {
|
191 |
-
|
192 |
-
if (is_null($root)) $root = $this->root;
|
193 |
-
|
194 |
-
// Making sure the path starts with a /
|
195 |
-
$path = '/' . ltrim($path,'/');
|
196 |
-
|
197 |
-
$response = $this->oauth->fetch('http://api.dropbox.com/0/fileops/create_folder', array('path' => $path, 'root' => $root),'POST');
|
198 |
-
return json_decode($response['body'],true);
|
199 |
-
|
200 |
-
}
|
201 |
-
|
202 |
-
/**
|
203 |
-
* Deletes a file or folder.
|
204 |
-
*
|
205 |
-
* This method will return the metadata information from the deleted file or folder, if successful.
|
206 |
-
*
|
207 |
-
* @param string $path Path to new folder
|
208 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
209 |
-
* @return array
|
210 |
-
*/
|
211 |
-
public function delete($path, $root = null) {
|
212 |
-
|
213 |
-
if (is_null($root)) $root = $this->root;
|
214 |
-
$response = $this->oauth->fetch('http://api.dropbox.com/0/fileops/delete', array('path' => $path, 'root' => $root));
|
215 |
-
return json_decode($response['body']);
|
216 |
-
|
217 |
-
}
|
218 |
-
|
219 |
-
/**
|
220 |
-
* Moves a file or directory to a new location
|
221 |
-
*
|
222 |
-
* This method returns the information from the newly created directory
|
223 |
-
*
|
224 |
-
* @param mixed $from Source path
|
225 |
-
* @param mixed $to destination path
|
226 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
227 |
-
* @return stdclass
|
228 |
-
*/
|
229 |
-
public function move($from, $to, $root = null) {
|
230 |
-
|
231 |
-
if (is_null($root)) $root = $this->root;
|
232 |
-
$response = $this->oauth->fetch('http://api.dropbox.com/0/fileops/move', array('from_path' => rawurldecode($from), 'to_path' => rawurldecode($to), 'root' => $root));
|
233 |
-
|
234 |
-
return json_decode($response['body'],true);
|
235 |
-
|
236 |
-
}
|
237 |
-
|
238 |
-
/**
|
239 |
-
* Returns a list of links for a directory
|
240 |
-
*
|
241 |
-
* The links can be used to securely open files throug a browser. The links are cookie protected
|
242 |
-
* so a user is asked to login if there's no valid session cookie.
|
243 |
-
*
|
244 |
-
* @param string $path Path to directory or file
|
245 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
246 |
-
* @deprecated This method is no longer supported
|
247 |
-
* @return array
|
248 |
-
*/
|
249 |
-
public function getLinks($path, $root = null) {
|
250 |
-
|
251 |
-
throw new Dropbox_Exception('This API method is currently broken, and dropbox documentation about this is no longer online. Please ask Dropbox support if you really need this.');
|
252 |
-
|
253 |
-
/*
|
254 |
-
if (is_null($root)) $root = $this->root;
|
255 |
-
|
256 |
-
$response = $this->oauth->fetch('http://api.dropbox.com/0/links/' . $root . '/' . ltrim($path,'/'));
|
257 |
-
return json_decode($response,true);
|
258 |
-
*/
|
259 |
-
|
260 |
-
}
|
261 |
-
|
262 |
-
/**
|
263 |
-
* Returns file and directory information
|
264 |
-
*
|
265 |
-
* @param string $path Path to receive information from
|
266 |
-
* @param bool $list When set to true, this method returns information from all files in a directory. When set to false it will only return infromation from the specified directory.
|
267 |
-
* @param string $hash If a hash is supplied, this method simply returns true if nothing has changed since the last request. Good for caching.
|
268 |
-
* @param int $fileLimit Maximum number of file-information to receive
|
269 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
270 |
-
* @return array|true
|
271 |
-
*/
|
272 |
-
public function getMetaData($path, $list = true, $hash = null, $fileLimit = null, $root = null) {
|
273 |
-
|
274 |
-
if (is_null($root)) $root = $this->root;
|
275 |
-
|
276 |
-
$args = array(
|
277 |
-
'list' => $list,
|
278 |
-
);
|
279 |
-
|
280 |
-
if (!is_null($hash)) $args['hash'] = $hash;
|
281 |
-
if (!is_null($fileLimit)) $args['file_limit'] = $fileLimit;
|
282 |
-
|
283 |
-
$path = implode("/", array_map('rawurlencode', explode("/", $path)));
|
284 |
-
$response = $this->oauth->fetch('http://api.dropbox.com/0/metadata/' . $root . '/' . ltrim($path,'/'), $args);
|
285 |
-
|
286 |
-
/* 304 is not modified */
|
287 |
-
if ($response['httpStatus']==304) {
|
288 |
-
return true;
|
289 |
-
} else {
|
290 |
-
return json_decode($response['body'],true);
|
291 |
-
}
|
292 |
-
|
293 |
-
}
|
294 |
-
|
295 |
-
/**
|
296 |
-
* Returns a thumbnail (as a string) for a file path.
|
297 |
-
*
|
298 |
-
* @param string $path Path to file
|
299 |
-
* @param string $size small, medium or large
|
300 |
-
* @param string $root Use this to override the default root path (sandbox/dropbox)
|
301 |
-
* @return string
|
302 |
-
*/
|
303 |
-
public function getThumbnail($path, $size = 'small', $root = null) {
|
304 |
-
|
305 |
-
if (is_null($root)) $root = $this->root;
|
306 |
-
$response = $this->oauth->fetch('http://api-content.dropbox.com/0/thumbnails/' . $root . '/' . ltrim($path,'/'),array('size' => $size));
|
307 |
-
|
308 |
-
return $response['body'];
|
309 |
-
|
310 |
-
}
|
311 |
-
|
312 |
-
/**
|
313 |
-
* This method is used to generate multipart POST requests for file upload
|
314 |
-
*
|
315 |
-
* @param string $uri
|
316 |
-
* @param array $arguments
|
317 |
-
* @return bool
|
318 |
-
*/
|
319 |
-
protected function multipartFetch($uri, $file, $filename) {
|
320 |
-
|
321 |
-
/* random string */
|
322 |
-
$boundary = 'R50hrfBj5JYyfR3vF3wR96GPCC9Fd2q2pVMERvEaOE3D8LZTgLLbRpNwXek3';
|
323 |
-
|
324 |
-
$headers = array(
|
325 |
-
'Content-Type' => 'multipart/form-data; boundary=' . $boundary,
|
326 |
-
);
|
327 |
-
|
328 |
-
$body="--" . $boundary . "\r\n";
|
329 |
-
$body.="Content-Disposition: form-data; name=file; filename=".rawurldecode($filename)."\r\n";
|
330 |
-
$body.="Content-type: application/octet-stream\r\n";
|
331 |
-
$body.="\r\n";
|
332 |
-
$body.=stream_get_contents($file);
|
333 |
-
$body.="\r\n";
|
334 |
-
$body.="--" . $boundary . "--";
|
335 |
-
|
336 |
-
// Dropbox requires the filename to also be part of the regular arguments, so it becomes
|
337 |
-
// part of the signature.
|
338 |
-
$uri.='?file=' . $filename;
|
339 |
-
|
340 |
-
return $this->oauth->fetch($uri, $body, 'POST', $headers);
|
341 |
-
|
342 |
-
}
|
343 |
-
|
344 |
-
|
345 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/Exception.php
DELETED
@@ -1,15 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox base exception
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Base exception class
|
14 |
-
*/
|
15 |
-
class Dropbox_Exception extends Exception { }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/Exception/Forbidden.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox Forbidden exception
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* This exception is thrown when we receive the 403 forbidden response
|
14 |
-
*/
|
15 |
-
class Dropbox_Exception_Forbidden extends Dropbox_Exception {
|
16 |
-
|
17 |
-
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/Exception/NotFound.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox Not Found exception
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* This exception is thrown when a non-existant uri is accessed.
|
14 |
-
*
|
15 |
-
* Basically, this exception is used when we get back a 404.
|
16 |
-
*/
|
17 |
-
class Dropbox_Exception_NotFound extends Dropbox_Exception {
|
18 |
-
|
19 |
-
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/Exception/OverQuota.php
DELETED
@@ -1,20 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox Over Quota exception
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* This exception is thrown when the operation required more space than the available quota.
|
14 |
-
*
|
15 |
-
* Basically, this exception is used when we get back a 507.
|
16 |
-
*/
|
17 |
-
class Dropbox_Exception_OverQuota extends Dropbox_Exception {
|
18 |
-
|
19 |
-
|
20 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/Exception/RequestToken.php
DELETED
@@ -1,18 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox RequestToken exception
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* This exception is thrown when an error occured during the request_token process.
|
14 |
-
*/
|
15 |
-
class Dropbox_Exception_RequestToken extends Dropbox_Exception {
|
16 |
-
|
17 |
-
|
18 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/OAuth.php
DELETED
@@ -1,151 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox OAuth
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
|
13 |
-
/**
|
14 |
-
* This class is an abstract OAuth class.
|
15 |
-
*
|
16 |
-
* It must be extended by classes who wish to provide OAuth functionality
|
17 |
-
* using different libraries.
|
18 |
-
*/
|
19 |
-
abstract class Dropbox_OAuth {
|
20 |
-
|
21 |
-
/**
|
22 |
-
* After a user has authorized access, dropbox can redirect the user back
|
23 |
-
* to this url.
|
24 |
-
*
|
25 |
-
* @var string
|
26 |
-
*/
|
27 |
-
public $authorizeCallbackUrl = null;
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Uri used to fetch request tokens
|
31 |
-
*
|
32 |
-
* @var string
|
33 |
-
*/
|
34 |
-
const URI_REQUEST_TOKEN = 'http://api.dropbox.com/0/oauth/request_token';
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Uri used to redirect the user to for authorization.
|
38 |
-
*
|
39 |
-
* @var string
|
40 |
-
*/
|
41 |
-
const URI_AUTHORIZE = 'http://www.dropbox.com/0/oauth/authorize';
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Uri used to
|
45 |
-
*
|
46 |
-
* @var string
|
47 |
-
*/
|
48 |
-
const URI_ACCESS_TOKEN = 'http://api.dropbox.com/0/oauth/access_token';
|
49 |
-
|
50 |
-
/**
|
51 |
-
* An OAuth request token.
|
52 |
-
*
|
53 |
-
* @var string
|
54 |
-
*/
|
55 |
-
protected $oauth_token = null;
|
56 |
-
|
57 |
-
/**
|
58 |
-
* OAuth token secret
|
59 |
-
*
|
60 |
-
* @var string
|
61 |
-
*/
|
62 |
-
protected $oauth_token_secret = null;
|
63 |
-
|
64 |
-
|
65 |
-
/**
|
66 |
-
* Constructor
|
67 |
-
*
|
68 |
-
* @param string $consumerKey
|
69 |
-
* @param string $consumerSecret
|
70 |
-
*/
|
71 |
-
abstract public function __construct($consumerKey, $consumerSecret);
|
72 |
-
|
73 |
-
/**
|
74 |
-
* Sets the request token and secret.
|
75 |
-
*
|
76 |
-
* The tokens can also be passed as an array into the first argument.
|
77 |
-
* The array must have the elements token and token_secret.
|
78 |
-
*
|
79 |
-
* @param string|array $token
|
80 |
-
* @param string $token_secret
|
81 |
-
* @return void
|
82 |
-
*/
|
83 |
-
public function setToken($token, $token_secret = null) {
|
84 |
-
|
85 |
-
if (is_array($token)) {
|
86 |
-
$this->oauth_token = $token['token'];
|
87 |
-
$this->oauth_token_secret = $token['token_secret'];
|
88 |
-
} else {
|
89 |
-
$this->oauth_token = $token;
|
90 |
-
$this->oauth_token_secret = $token_secret;
|
91 |
-
}
|
92 |
-
|
93 |
-
}
|
94 |
-
|
95 |
-
/**
|
96 |
-
* Returns the oauth request tokens as an associative array.
|
97 |
-
*
|
98 |
-
* The array will contain the elements 'token' and 'token_secret'.
|
99 |
-
*
|
100 |
-
* @return array
|
101 |
-
*/
|
102 |
-
public function getToken() {
|
103 |
-
|
104 |
-
return array(
|
105 |
-
'token' => $this->oauth_token,
|
106 |
-
'token_secret' => $this->oauth_token_secret,
|
107 |
-
);
|
108 |
-
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Returns the authorization url
|
113 |
-
*
|
114 |
-
* @param string $callBack Specify a callback url to automatically redirect the user back
|
115 |
-
* @return string
|
116 |
-
*/
|
117 |
-
public function getAuthorizeUrl($callBack = null) {
|
118 |
-
|
119 |
-
// Building the redirect uri
|
120 |
-
$token = $this->getToken();
|
121 |
-
$uri = self::URI_AUTHORIZE . '?oauth_token=' . $token['token'];
|
122 |
-
if ($callBack) $uri.='&oauth_callback=' . $callBack;
|
123 |
-
return $uri;
|
124 |
-
}
|
125 |
-
|
126 |
-
/**
|
127 |
-
* Fetches a secured oauth url and returns the response body.
|
128 |
-
*
|
129 |
-
* @param string $uri
|
130 |
-
* @param mixed $arguments
|
131 |
-
* @param string $method
|
132 |
-
* @param array $httpHeaders
|
133 |
-
* @return string
|
134 |
-
*/
|
135 |
-
public abstract function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array());
|
136 |
-
|
137 |
-
/**
|
138 |
-
* Requests the OAuth request token.
|
139 |
-
*
|
140 |
-
* @return array
|
141 |
-
*/
|
142 |
-
abstract public function getRequestToken();
|
143 |
-
|
144 |
-
/**
|
145 |
-
* Requests the OAuth access tokens.
|
146 |
-
*
|
147 |
-
* @return array
|
148 |
-
*/
|
149 |
-
abstract public function getAccessToken();
|
150 |
-
|
151 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/OAuth/Curl.php
DELETED
@@ -1,281 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox OAuth
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2011 Daniel Huesken
|
8 |
-
* @author Daniel Huesken (http://www.danielhuesken.de/)
|
9 |
-
* @license MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* This class is used to sign all requests to dropbox.
|
14 |
-
*
|
15 |
-
* This specific class uses WordPress WP_Http to authenticate.
|
16 |
-
*/
|
17 |
-
class Dropbox_OAuth_Curl extends Dropbox_OAuth {
|
18 |
-
|
19 |
-
/**
|
20 |
-
*
|
21 |
-
* @var string ConsumerKey
|
22 |
-
*/
|
23 |
-
protected $consumerKey = null;
|
24 |
-
/**
|
25 |
-
*
|
26 |
-
* @var string ConsumerSecret
|
27 |
-
*/
|
28 |
-
protected $consumerSecret = null;
|
29 |
-
/**
|
30 |
-
*
|
31 |
-
* @var string ProzessCallBack
|
32 |
-
*/
|
33 |
-
public $ProgressFunction = false;
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Constructor
|
37 |
-
*
|
38 |
-
* @param string $consumerKey
|
39 |
-
* @param string $consumerSecret
|
40 |
-
*/
|
41 |
-
public function __construct($consumerKey, $consumerSecret) {
|
42 |
-
if (!function_exists('curl_exec'))
|
43 |
-
throw new Dropbox_Exception('The PHP curl functions not available!');
|
44 |
-
|
45 |
-
$this->consumerKey = $consumerKey;
|
46 |
-
$this->consumerSecret = $consumerSecret;
|
47 |
-
}
|
48 |
-
|
49 |
-
/**
|
50 |
-
* Fetches a secured oauth url and returns the response body.
|
51 |
-
*
|
52 |
-
* @param string $uri
|
53 |
-
* @param mixed $arguments
|
54 |
-
* @param string $method
|
55 |
-
* @param array $httpHeaders
|
56 |
-
* @return string
|
57 |
-
*/
|
58 |
-
public function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array()) {
|
59 |
-
|
60 |
-
$uri=str_replace('http://', 'https://', $uri); // all https, upload makes problems if not
|
61 |
-
if (is_string($arguments) and strtoupper($method) == 'POST') {
|
62 |
-
preg_match("/\?file=(.*)$/i", $uri, $matches);
|
63 |
-
if (isset($matches[1])) {
|
64 |
-
$uri = str_replace($matches[0], "", $uri);
|
65 |
-
$filename = $matches[1];
|
66 |
-
$httpHeaders=array_merge($httpHeaders,$this->getOAuthHeader($uri, array("file" => $filename), $method));
|
67 |
-
}
|
68 |
-
} else {
|
69 |
-
$httpHeaders=array_merge($httpHeaders,$this->getOAuthHeader($uri, $arguments, $method));
|
70 |
-
}
|
71 |
-
|
72 |
-
$ch = curl_init();
|
73 |
-
if (strtoupper($method) == 'POST') {
|
74 |
-
curl_setopt($ch, CURLOPT_URL, $uri);
|
75 |
-
curl_setopt($ch, CURLOPT_POST, true);
|
76 |
-
if (is_array($arguments))
|
77 |
-
$arguments=http_build_query($arguments);
|
78 |
-
curl_setopt($ch, CURLOPT_POSTFIELDS, $arguments);
|
79 |
-
$httpHeaders['Content-Length']=strlen($arguments);
|
80 |
-
} else {
|
81 |
-
curl_setopt($ch, CURLOPT_URL, $uri.'?'.http_build_query($arguments));
|
82 |
-
curl_setopt($ch, CURLOPT_POST, false);
|
83 |
-
}
|
84 |
-
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
85 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
86 |
-
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
87 |
-
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
|
88 |
-
//Build header
|
89 |
-
$headers = array();
|
90 |
-
foreach ($httpHeaders as $name => $value) {
|
91 |
-
$headers[] = "{$name}: $value";
|
92 |
-
}
|
93 |
-
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
94 |
-
if (!ini_get('safe_mode') && !ini_get('open_basedir'))
|
95 |
-
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );
|
96 |
-
if (function_exists($this->ProgressFunction) and defined('CURLOPT_PROGRESSFUNCTION')) {
|
97 |
-
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
|
98 |
-
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, $this->ProgressFunction);
|
99 |
-
curl_setopt($ch, CURLOPT_BUFFERSIZE, 512);
|
100 |
-
}
|
101 |
-
$response=curl_exec($ch);
|
102 |
-
$errorno=curl_errno($ch);
|
103 |
-
$error=curl_error($ch);
|
104 |
-
$status=curl_getinfo($ch,CURLINFO_HTTP_CODE);
|
105 |
-
curl_close($ch);
|
106 |
-
|
107 |
-
|
108 |
-
if (!empty($errorno))
|
109 |
-
throw new Dropbox_Exception_NotFound('Curl error: ('.$errorno.') '.$error."\n");
|
110 |
-
|
111 |
-
if ($status>=300) {
|
112 |
-
$body = json_decode($response,true);
|
113 |
-
switch ($status) {
|
114 |
-
// Not modified
|
115 |
-
case 304 :
|
116 |
-
return array(
|
117 |
-
'httpStatus' => 304,
|
118 |
-
'body' => null,
|
119 |
-
);
|
120 |
-
break;
|
121 |
-
case 403 :
|
122 |
-
throw new Dropbox_Exception_Forbidden('Forbidden.
|
123 |
-
This could mean a bad OAuth request, or a file or folder already existing at the target location.
|
124 |
-
' . $body["error"] . "\n");
|
125 |
-
case 404 :
|
126 |
-
throw new Dropbox_Exception_NotFound('Resource at uri: ' . $uri . ' could not be found. ' .
|
127 |
-
$body["error"] . "\n");
|
128 |
-
case 507 :
|
129 |
-
throw new Dropbox_Exception_OverQuota('This dropbox is full. ' .
|
130 |
-
$body["error"] . "\n");
|
131 |
-
}
|
132 |
-
if (!empty($body["error"]))
|
133 |
-
throw new Dropbox_Exception_RequestToken('Error: ('.$status.') '.$body["error"]."\n");
|
134 |
-
}
|
135 |
-
|
136 |
-
return array(
|
137 |
-
'body' => $response,
|
138 |
-
'httpStatus' => $status
|
139 |
-
);
|
140 |
-
}
|
141 |
-
|
142 |
-
/**
|
143 |
-
* Returns named array with oauth parameters for further use
|
144 |
-
* @return array Array with oauth_ parameters
|
145 |
-
*/
|
146 |
-
private function getOAuthBaseParams() {
|
147 |
-
$params['oauth_version'] = '1.0';
|
148 |
-
$params['oauth_signature_method'] = 'HMAC-SHA1';
|
149 |
-
|
150 |
-
$params['oauth_consumer_key'] = $this->consumerKey;
|
151 |
-
$tokens = $this->getToken();
|
152 |
-
if (isset($tokens['token']) && $tokens['token']) {
|
153 |
-
$params['oauth_token'] = $tokens['token'];
|
154 |
-
}
|
155 |
-
$params['oauth_timestamp'] = time();
|
156 |
-
$params['oauth_nonce'] = md5(microtime() . mt_rand());
|
157 |
-
return $params;
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Creates valid Authorization header for OAuth, based on URI and Params
|
162 |
-
*
|
163 |
-
* @param string $uri
|
164 |
-
* @param array $params
|
165 |
-
* @param string $method GET or POST, standard is GET
|
166 |
-
* @param array $oAuthParams optional, pass your own oauth_params here
|
167 |
-
* @return array Array for request's headers section like
|
168 |
-
* array('Authorization' => 'OAuth ...');
|
169 |
-
*/
|
170 |
-
private function getOAuthHeader($uri, $params, $method = 'GET', $oAuthParams = null) {
|
171 |
-
$oAuthParams = $oAuthParams ? $oAuthParams : $this->getOAuthBaseParams();
|
172 |
-
|
173 |
-
// create baseString to encode for the sent parameters
|
174 |
-
$baseString = $method . '&';
|
175 |
-
$baseString .= $this->oauth_urlencode($uri) . "&";
|
176 |
-
|
177 |
-
// OAuth header does not include GET-Parameters
|
178 |
-
$signatureParams = array_merge($params, $oAuthParams);
|
179 |
-
|
180 |
-
// sorting the parameters
|
181 |
-
ksort($signatureParams);
|
182 |
-
|
183 |
-
$encodedParams = array();
|
184 |
-
foreach ($signatureParams as $key => $value) {
|
185 |
-
$encodedParams[] = $this->oauth_urlencode($key) . '=' . $this->oauth_urlencode($value);
|
186 |
-
}
|
187 |
-
|
188 |
-
$baseString .= $this->oauth_urlencode(implode('&', $encodedParams));
|
189 |
-
|
190 |
-
// encode the signature
|
191 |
-
$tokens = $this->getToken();
|
192 |
-
$hash = $this->hash_hmac_sha1($this->consumerSecret.'&'.$tokens['token_secret'], $baseString);
|
193 |
-
$signature = base64_encode($hash);
|
194 |
-
|
195 |
-
// add signature to oAuthParams
|
196 |
-
$oAuthParams['oauth_signature'] = $signature;
|
197 |
-
|
198 |
-
$oAuthEncoded = array();
|
199 |
-
foreach ($oAuthParams as $key => $value) {
|
200 |
-
$oAuthEncoded[] = $key . '="' . $this->oauth_urlencode($value) . '"';
|
201 |
-
}
|
202 |
-
|
203 |
-
return array('Authorization' => 'OAuth ' . implode(', ', $oAuthEncoded));
|
204 |
-
}
|
205 |
-
|
206 |
-
/**
|
207 |
-
* Requests the OAuth request token.
|
208 |
-
*
|
209 |
-
* @return void
|
210 |
-
*/
|
211 |
-
public function getRequestToken() {
|
212 |
-
$result = $this->fetch(self::URI_REQUEST_TOKEN, array(), 'POST');
|
213 |
-
if ($result['httpStatus'] == "200") {
|
214 |
-
$tokens = array();
|
215 |
-
parse_str($result['body'], $tokens);
|
216 |
-
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
|
217 |
-
return $this->getToken();
|
218 |
-
} else {
|
219 |
-
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.');
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
/**
|
224 |
-
* Requests the OAuth access tokens.
|
225 |
-
*
|
226 |
-
* This method requires the 'unauthorized' request tokens
|
227 |
-
* and, if successful will set the authorized request tokens.
|
228 |
-
*
|
229 |
-
* @return void
|
230 |
-
*/
|
231 |
-
public function getAccessToken() {
|
232 |
-
$result = $this->fetch(self::URI_ACCESS_TOKEN, array(), 'POST');
|
233 |
-
if ($result['httpStatus'] == "200") {
|
234 |
-
$tokens = array();
|
235 |
-
parse_str($result['body'], $tokens);
|
236 |
-
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
|
237 |
-
return $this->getToken();
|
238 |
-
} else {
|
239 |
-
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.');
|
240 |
-
}
|
241 |
-
}
|
242 |
-
|
243 |
-
/**
|
244 |
-
* Helper function to properly urlencode parameters.
|
245 |
-
* See http://php.net/manual/en/function.oauth-urlencode.php
|
246 |
-
*
|
247 |
-
* @param string $string
|
248 |
-
* @return string
|
249 |
-
*/
|
250 |
-
private function oauth_urlencode($string) {
|
251 |
-
return str_replace('%E7', '~', rawurlencode($string));
|
252 |
-
}
|
253 |
-
|
254 |
-
/**
|
255 |
-
* Hash function for hmac_sha1; uses native function if available.
|
256 |
-
*
|
257 |
-
* @param string $key
|
258 |
-
* @param string $data
|
259 |
-
* @return string
|
260 |
-
*/
|
261 |
-
private function hash_hmac_sha1($key, $data) {
|
262 |
-
if (function_exists('hash_hmac') && in_array('sha1', hash_algos())) {
|
263 |
-
return hash_hmac('sha1', $data, $key, true);
|
264 |
-
} else {
|
265 |
-
$blocksize = 64;
|
266 |
-
$hashfunc = 'sha1';
|
267 |
-
if (strlen($key) > $blocksize) {
|
268 |
-
$key = pack('H*', $hashfunc($key));
|
269 |
-
}
|
270 |
-
|
271 |
-
$key = str_pad($key, $blocksize, chr(0x00));
|
272 |
-
$ipad = str_repeat(chr(0x36), $blocksize);
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/OAuth/PEAR.php
DELETED
@@ -1,170 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox OAuth
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
|
13 |
-
/**
|
14 |
-
* This class is used to sign all requests to dropbox
|
15 |
-
*
|
16 |
-
* This classes use the PEAR HTTP_OAuth package. Make sure this is installed.
|
17 |
-
*/
|
18 |
-
class Dropbox_OAuth_PEAR extends Dropbox_OAuth {
|
19 |
-
|
20 |
-
/**
|
21 |
-
* OAuth object
|
22 |
-
*
|
23 |
-
* @var OAuth
|
24 |
-
*/
|
25 |
-
protected $oAuth;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* OAuth consumer key
|
29 |
-
*
|
30 |
-
* We need to keep this around for later.
|
31 |
-
*
|
32 |
-
* @var string
|
33 |
-
*/
|
34 |
-
protected $consumerKey;
|
35 |
-
|
36 |
-
/**
|
37 |
-
* Constructor
|
38 |
-
*
|
39 |
-
* @param string $consumerKey
|
40 |
-
* @param string $consumerSecret
|
41 |
-
*/
|
42 |
-
public function __construct($consumerKey, $consumerSecret) {
|
43 |
-
|
44 |
-
if (!class_exists('HTTP_OAuth_Consumer')) {
|
45 |
-
|
46 |
-
// We're going to try to load in manually
|
47 |
-
include 'HTTP/OAuth/Consumer.php';
|
48 |
-
|
49 |
-
}
|
50 |
-
if (!class_exists('HTTP_OAuth_Consumer'))
|
51 |
-
throw new Dropbox_Exception('The HTTP_OAuth_Consumer class could not be found! Did you install the pear HTTP_OAUTH class?');
|
52 |
-
|
53 |
-
$this->OAuth = new HTTP_OAuth_Consumer($consumerKey, $consumerSecret);
|
54 |
-
$this->consumerKey = $consumerKey;
|
55 |
-
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Sets the request token and secret.
|
60 |
-
*
|
61 |
-
* The tokens can also be passed as an array into the first argument.
|
62 |
-
* The array must have the elements token and token_secret.
|
63 |
-
*
|
64 |
-
* @param string|array $token
|
65 |
-
* @param string $token_secret
|
66 |
-
* @return void
|
67 |
-
*/
|
68 |
-
public function setToken($token, $token_secret = null) {
|
69 |
-
|
70 |
-
parent::setToken($token,$token_secret);
|
71 |
-
$this->OAuth->setToken($this->oauth_token);
|
72 |
-
$this->OAuth->setTokenSecret($this->oauth_token_secret);
|
73 |
-
|
74 |
-
}
|
75 |
-
|
76 |
-
/**
|
77 |
-
* Fetches a secured oauth url and returns the response body.
|
78 |
-
*
|
79 |
-
* @param string $uri
|
80 |
-
* @param mixed $arguments
|
81 |
-
* @param string $method
|
82 |
-
* @param array $httpHeaders
|
83 |
-
* @return string
|
84 |
-
*/
|
85 |
-
public function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array()) {
|
86 |
-
|
87 |
-
$consumerRequest = new HTTP_OAuth_Consumer_Request();
|
88 |
-
$consumerRequest->setUrl($uri);
|
89 |
-
$consumerRequest->setMethod($method);
|
90 |
-
$consumerRequest->setSecrets($this->OAuth->getSecrets());
|
91 |
-
|
92 |
-
$parameters = array(
|
93 |
-
'oauth_consumer_key' => $this->consumerKey,
|
94 |
-
'oauth_signature_method' => 'HMAC-SHA1',
|
95 |
-
'oauth_token' => $this->oauth_token,
|
96 |
-
);
|
97 |
-
|
98 |
-
|
99 |
-
if (is_array($arguments)) {
|
100 |
-
$parameters = array_merge($parameters,$arguments);
|
101 |
-
} elseif (is_string($arguments)) {
|
102 |
-
$consumerRequest->setBody($arguments);
|
103 |
-
}
|
104 |
-
$consumerRequest->setParameters($parameters);
|
105 |
-
|
106 |
-
|
107 |
-
if (count($httpHeaders)) {
|
108 |
-
foreach($httpHeaders as $k=>$v) {
|
109 |
-
$consumerRequest->setHeader($k, $v);
|
110 |
-
}
|
111 |
-
}
|
112 |
-
|
113 |
-
$response = $consumerRequest->send();
|
114 |
-
|
115 |
-
switch($response->getStatus()) {
|
116 |
-
|
117 |
-
// Not modified
|
118 |
-
case 304 :
|
119 |
-
return array(
|
120 |
-
'httpStatus' => 304,
|
121 |
-
'body' => null,
|
122 |
-
);
|
123 |
-
break;
|
124 |
-
case 403 :
|
125 |
-
throw new Dropbox_Exception_Forbidden('Forbidden. This could mean a bad OAuth request, or a file or folder already existing at the target location.');
|
126 |
-
case 404 :
|
127 |
-
throw new Dropbox_Exception_NotFound('Resource at uri: ' . $uri . ' could not be found');
|
128 |
-
case 507 :
|
129 |
-
throw new Dropbox_Exception_OverQuota('This dropbox is full');
|
130 |
-
|
131 |
-
}
|
132 |
-
|
133 |
-
return array(
|
134 |
-
'httpStatus' => $response->getStatus(),
|
135 |
-
'body' => $response->getBody()
|
136 |
-
);
|
137 |
-
|
138 |
-
}
|
139 |
-
|
140 |
-
/**
|
141 |
-
* Requests the OAuth request token.
|
142 |
-
*
|
143 |
-
* @return void
|
144 |
-
*/
|
145 |
-
public function getRequestToken() {
|
146 |
-
|
147 |
-
$this->OAuth->getRequestToken(self::URI_REQUEST_TOKEN);
|
148 |
-
$this->setToken($this->OAuth->getToken(), $this->OAuth->getTokenSecret());
|
149 |
-
return $this->getToken();
|
150 |
-
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Requests the OAuth access tokens.
|
155 |
-
*
|
156 |
-
* This method requires the 'unauthorized' request tokens
|
157 |
-
* and, if successful will set the authorized request tokens.
|
158 |
-
*
|
159 |
-
* @return void
|
160 |
-
*/
|
161 |
-
public function getAccessToken() {
|
162 |
-
|
163 |
-
$this->OAuth->getAccessToken(self::URI_ACCESS_TOKEN);
|
164 |
-
$this->setToken($this->OAuth->getToken(), $this->OAuth->getTokenSecret());
|
165 |
-
return $this->getToken();
|
166 |
-
|
167 |
-
}
|
168 |
-
|
169 |
-
|
170 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/OAuth/PHP.php
DELETED
@@ -1,147 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox OAuth
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
|
13 |
-
/**
|
14 |
-
* This class is used to sign all requests to dropbox.
|
15 |
-
*
|
16 |
-
* This specific class uses the PHP OAuth extension
|
17 |
-
*/
|
18 |
-
class Dropbox_OAuth_PHP extends Dropbox_OAuth {
|
19 |
-
|
20 |
-
/**
|
21 |
-
* OAuth object
|
22 |
-
*
|
23 |
-
* @var OAuth
|
24 |
-
*/
|
25 |
-
protected $oAuth;
|
26 |
-
|
27 |
-
/**
|
28 |
-
* Constructor
|
29 |
-
*
|
30 |
-
* @param string $consumerKey
|
31 |
-
* @param string $consumerSecret
|
32 |
-
*/
|
33 |
-
public function __construct($consumerKey, $consumerSecret) {
|
34 |
-
|
35 |
-
if (!class_exists('OAuth'))
|
36 |
-
throw new Dropbox_Exception('The OAuth class could not be found! Did you install and enable the oauth extension?');
|
37 |
-
|
38 |
-
$this->OAuth = new OAuth($consumerKey, $consumerSecret,OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_URI);
|
39 |
-
$this->OAuth->enableDebug();
|
40 |
-
|
41 |
-
}
|
42 |
-
|
43 |
-
/**
|
44 |
-
* Sets the request token and secret.
|
45 |
-
*
|
46 |
-
* The tokens can also be passed as an array into the first argument.
|
47 |
-
* The array must have the elements token and token_secret.
|
48 |
-
*
|
49 |
-
* @param string|array $token
|
50 |
-
* @param string $token_secret
|
51 |
-
* @return void
|
52 |
-
*/
|
53 |
-
public function setToken($token, $token_secret = null) {
|
54 |
-
|
55 |
-
parent::setToken($token,$token_secret);
|
56 |
-
$this->OAuth->setToken($this->oauth_token, $this->oauth_token_secret);
|
57 |
-
|
58 |
-
}
|
59 |
-
|
60 |
-
|
61 |
-
/**
|
62 |
-
* Fetches a secured oauth url and returns the response body.
|
63 |
-
*
|
64 |
-
* @param string $uri
|
65 |
-
* @param mixed $arguments
|
66 |
-
* @param string $method
|
67 |
-
* @param array $httpHeaders
|
68 |
-
* @return string
|
69 |
-
*/
|
70 |
-
public function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array()) {
|
71 |
-
|
72 |
-
try {
|
73 |
-
$this->OAuth->fetch($uri, $arguments, $method, $httpHeaders);
|
74 |
-
$result = $this->OAuth->getLastResponse();
|
75 |
-
$lastResponseInfo = $this->OAuth->getLastResponseInfo();
|
76 |
-
return array(
|
77 |
-
'httpStatus' => $lastResponseInfo['http_code'],
|
78 |
-
'body' => $result,
|
79 |
-
);
|
80 |
-
} catch (OAuthException $e) {
|
81 |
-
|
82 |
-
$lastResponseInfo = $this->OAuth->getLastResponseInfo();
|
83 |
-
switch($lastResponseInfo['http_code']) {
|
84 |
-
|
85 |
-
// Not modified
|
86 |
-
case 304 :
|
87 |
-
return array(
|
88 |
-
'httpStatus' => 304,
|
89 |
-
'body' => null,
|
90 |
-
);
|
91 |
-
break;
|
92 |
-
case 403 :
|
93 |
-
throw new Dropbox_Exception_Forbidden('Forbidden. This could mean a bad OAuth request, or a file or folder already existing at the target location.');
|
94 |
-
case 404 :
|
95 |
-
throw new Dropbox_Exception_NotFound('Resource at uri: ' . $uri . ' could not be found');
|
96 |
-
case 507 :
|
97 |
-
throw new Dropbox_Exception_OverQuota('This dropbox is full');
|
98 |
-
default:
|
99 |
-
// rethrowing
|
100 |
-
throw $e;
|
101 |
-
}
|
102 |
-
|
103 |
-
}
|
104 |
-
|
105 |
-
}
|
106 |
-
|
107 |
-
/**
|
108 |
-
* Requests the OAuth request token.
|
109 |
-
*
|
110 |
-
* @return void
|
111 |
-
*/
|
112 |
-
public function getRequestToken() {
|
113 |
-
|
114 |
-
try {
|
115 |
-
|
116 |
-
$tokens = $this->OAuth->getRequestToken(self::URI_REQUEST_TOKEN);
|
117 |
-
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
|
118 |
-
return $this->getToken();
|
119 |
-
|
120 |
-
} catch (OAuthException $e) {
|
121 |
-
|
122 |
-
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.',0,$e);
|
123 |
-
|
124 |
-
}
|
125 |
-
|
126 |
-
}
|
127 |
-
|
128 |
-
|
129 |
-
/**
|
130 |
-
* Requests the OAuth access tokens.
|
131 |
-
*
|
132 |
-
* This method requires the 'unauthorized' request tokens
|
133 |
-
* and, if successful will set the authorized request tokens.
|
134 |
-
*
|
135 |
-
* @return void
|
136 |
-
*/
|
137 |
-
public function getAccessToken() {
|
138 |
-
|
139 |
-
$uri = self::URI_ACCESS_TOKEN;
|
140 |
-
$tokens = $this->OAuth->getAccessToken($uri);
|
141 |
-
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
|
142 |
-
return $this->getToken();
|
143 |
-
|
144 |
-
}
|
145 |
-
|
146 |
-
|
147 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/OAuth/Wordpress.php
DELETED
@@ -1,223 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox OAuth
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Stefan Motz
|
8 |
-
* @author Stefan Motz (http://www.multimediamotz.de/)
|
9 |
-
* @license MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* This class is used to sign all requests to dropbox.
|
14 |
-
*
|
15 |
-
* This specific class uses WordPress WP_Http to authenticate.
|
16 |
-
*/
|
17 |
-
class Dropbox_OAuth_Wordpress extends Dropbox_OAuth {
|
18 |
-
|
19 |
-
/**
|
20 |
-
*
|
21 |
-
* @var string ConsumerKey
|
22 |
-
*/
|
23 |
-
protected $consumerKey = null;
|
24 |
-
/**
|
25 |
-
*
|
26 |
-
* @var string ConsumerSecret
|
27 |
-
*/
|
28 |
-
protected $consumerSecret = null;
|
29 |
-
|
30 |
-
/**
|
31 |
-
* Constructor
|
32 |
-
*
|
33 |
-
* @param string $consumerKey
|
34 |
-
* @param string $consumerSecret
|
35 |
-
*/
|
36 |
-
public function __construct($consumerKey, $consumerSecret) {
|
37 |
-
if (!(defined('ABSPATH') && defined('WPINC')))
|
38 |
-
throw new Dropbox_Exception('The Wordpress OAuth class is available within a wordpress context only!');
|
39 |
-
if (!class_exists('WP_Http')) {
|
40 |
-
include_once( ABSPATH . WPINC . '/class-http.php' );
|
41 |
-
}
|
42 |
-
|
43 |
-
$this->consumerKey = $consumerKey;
|
44 |
-
$this->consumerSecret = $consumerSecret;
|
45 |
-
}
|
46 |
-
|
47 |
-
/**
|
48 |
-
* Fetches a secured oauth url and returns the response body.
|
49 |
-
*
|
50 |
-
* @param string $uri
|
51 |
-
* @param mixed $arguments
|
52 |
-
* @param string $method
|
53 |
-
* @param array $httpHeaders
|
54 |
-
* @return string
|
55 |
-
*/
|
56 |
-
public function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array()) {
|
57 |
-
|
58 |
-
$requestParams = array();
|
59 |
-
|
60 |
-
$requestParams['method'] = $method;
|
61 |
-
$oAuthHeader = $this->getOAuthHeader($uri, $arguments, $method);
|
62 |
-
$requestParams['headers'] = array_merge($httpHeaders, $oAuthHeader);
|
63 |
-
|
64 |
-
// arguments will be passed to uri for GET, to body for POST etc.
|
65 |
-
if ($method == 'GET') {
|
66 |
-
$uri .= '?' . http_build_query($arguments);
|
67 |
-
} else {
|
68 |
-
if (count($arguments)) {
|
69 |
-
$requestParams['body'] = $arguments;
|
70 |
-
}
|
71 |
-
}
|
72 |
-
|
73 |
-
$request = new WP_Http;
|
74 |
-
|
75 |
-
//$uri = str_replace('api.dropbox.com', 'localhost:12346', $uri);
|
76 |
-
|
77 |
-
$result = $request->request($uri, $requestParams);
|
78 |
-
|
79 |
-
return array(
|
80 |
-
'httpStatus' => $result['response']['code'],
|
81 |
-
'body' => $result['body'],
|
82 |
-
);
|
83 |
-
}
|
84 |
-
|
85 |
-
/**
|
86 |
-
* Returns named array with oauth parameters for further use
|
87 |
-
* @return array Array with oauth_ parameters
|
88 |
-
*/
|
89 |
-
private function getOAuthBaseParams() {
|
90 |
-
$params['oauth_version'] = '1.0';
|
91 |
-
$params['oauth_signature_method'] = 'HMAC-SHA1';
|
92 |
-
|
93 |
-
$params['oauth_consumer_key'] = $this->consumerKey;
|
94 |
-
$tokens = $this->getToken();
|
95 |
-
if (isset($tokens['token']) && $tokens['token']) {
|
96 |
-
$params['oauth_token'] = $tokens['token'];
|
97 |
-
}
|
98 |
-
$params['oauth_timestamp'] = time();
|
99 |
-
$params['oauth_nonce'] = md5(microtime() . mt_rand());
|
100 |
-
return $params;
|
101 |
-
}
|
102 |
-
|
103 |
-
/**
|
104 |
-
* Creates valid Authorization header for OAuth, based on URI and Params
|
105 |
-
*
|
106 |
-
* @param string $uri
|
107 |
-
* @param array $params
|
108 |
-
* @param string $method GET or POST, standard is GET
|
109 |
-
* @param array $oAuthParams optional, pass your own oauth_params here
|
110 |
-
* @return array Array for request's headers section like
|
111 |
-
* array('Authorization' => 'OAuth ...');
|
112 |
-
*/
|
113 |
-
private function getOAuthHeader($uri, $params, $method = 'GET', $oAuthParams = null) {
|
114 |
-
$oAuthParams = $oAuthParams ? $oAuthParams : $this->getOAuthBaseParams();
|
115 |
-
|
116 |
-
// create baseString to encode for the sent parameters
|
117 |
-
$baseString = $method . '&';
|
118 |
-
$baseString .= $this->oauth_urlencode($uri) . "&";
|
119 |
-
|
120 |
-
// OAuth header does not include GET-Parameters
|
121 |
-
$signatureParams = array_merge($params, $oAuthParams);
|
122 |
-
|
123 |
-
// sorting the parameters
|
124 |
-
ksort($signatureParams);
|
125 |
-
|
126 |
-
$encodedParams = array();
|
127 |
-
foreach ($signatureParams as $key => $value) {
|
128 |
-
$encodedParams[] = $this->oauth_urlencode($key) . '=' . $this->oauth_urlencode($value);
|
129 |
-
}
|
130 |
-
|
131 |
-
$baseString .= $this->oauth_urlencode(implode('&', $encodedParams));
|
132 |
-
|
133 |
-
// encode the signature
|
134 |
-
$tokens = $this->getToken();
|
135 |
-
$hash = $this->hash_hmac_sha1($this->consumerSecret.'&'.$tokens['token_secret'], $baseString);
|
136 |
-
$signature = base64_encode($hash);
|
137 |
-
|
138 |
-
// add signature to oAuthParams
|
139 |
-
$oAuthParams['oauth_signature'] = $signature;
|
140 |
-
|
141 |
-
$oAuthEncoded = array();
|
142 |
-
foreach ($oAuthParams as $key => $value) {
|
143 |
-
$oAuthEncoded[] = $key . '="' . $this->oauth_urlencode($value) . '"';
|
144 |
-
}
|
145 |
-
|
146 |
-
return array('Authorization' => 'OAuth ' . implode(', ', $oAuthEncoded));
|
147 |
-
}
|
148 |
-
|
149 |
-
/**
|
150 |
-
* Requests the OAuth request token.
|
151 |
-
*
|
152 |
-
* @return void
|
153 |
-
*/
|
154 |
-
public function getRequestToken() {
|
155 |
-
$result = $this->fetch(self::URI_REQUEST_TOKEN, array(), 'POST');
|
156 |
-
if ($result['httpStatus'] == "200") {
|
157 |
-
$tokens = array();
|
158 |
-
parse_str($result['body'], $tokens);
|
159 |
-
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
|
160 |
-
return $this->getToken();
|
161 |
-
} else {
|
162 |
-
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.');
|
163 |
-
}
|
164 |
-
}
|
165 |
-
|
166 |
-
/**
|
167 |
-
* Requests the OAuth access tokens.
|
168 |
-
*
|
169 |
-
* This method requires the 'unauthorized' request tokens
|
170 |
-
* and, if successful will set the authorized request tokens.
|
171 |
-
*
|
172 |
-
* @return void
|
173 |
-
*/
|
174 |
-
public function getAccessToken() {
|
175 |
-
$result = $this->fetch(self::URI_ACCESS_TOKEN, array(), 'POST');
|
176 |
-
if ($result['httpStatus'] == "200") {
|
177 |
-
$tokens = array();
|
178 |
-
parse_str($result['body'], $tokens);
|
179 |
-
$this->setToken($tokens['oauth_token'], $tokens['oauth_token_secret']);
|
180 |
-
return $this->getToken();
|
181 |
-
} else {
|
182 |
-
throw new Dropbox_Exception_RequestToken('We were unable to fetch request tokens. This likely means that your consumer key and/or secret are incorrect.');
|
183 |
-
}
|
184 |
-
}
|
185 |
-
|
186 |
-
/**
|
187 |
-
* Helper function to properly urlencode parameters.
|
188 |
-
* See http://php.net/manual/en/function.oauth-urlencode.php
|
189 |
-
*
|
190 |
-
* @param string $string
|
191 |
-
* @return string
|
192 |
-
*/
|
193 |
-
private function oauth_urlencode($string) {
|
194 |
-
return str_replace('%E7', '~', rawurlencode($string));
|
195 |
-
}
|
196 |
-
|
197 |
-
/**
|
198 |
-
* Hash function for hmac_sha1; uses native function if available.
|
199 |
-
*
|
200 |
-
* @param string $key
|
201 |
-
* @param string $data
|
202 |
-
* @return string
|
203 |
-
*/
|
204 |
-
private function hash_hmac_sha1($key, $data) {
|
205 |
-
if (function_exists('hash_hmac') && in_array('sha1', hash_algos())) {
|
206 |
-
return hash_hmac('sha1', $data, $key, true);
|
207 |
-
} else {
|
208 |
-
$blocksize = 64;
|
209 |
-
$hashfunc = 'sha1';
|
210 |
-
if (strlen($key) > $blocksize) {
|
211 |
-
$key = pack('H*', $hashfunc($key));
|
212 |
-
}
|
213 |
-
|
214 |
-
$key = str_pad($key, $blocksize, chr(0x00));
|
215 |
-
$ipad = str_repeat(chr(0x36), $blocksize);
|
216 |
-
$opad = str_repeat(chr(0x5c), $blocksize);
|
217 |
-
$hash = pack('H*', $hashfunc(( $key ^ $opad ) . pack('H*', $hashfunc(($key ^ $ipad) . $data))));
|
218 |
-
|
219 |
-
return $hash;
|
220 |
-
}
|
221 |
-
}
|
222 |
-
|
223 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/Dropbox/OAuth/Zend.php
DELETED
@@ -1,244 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Dropbox OAuth
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Michael Johansen <michael@taskcamp.com>
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* This class is used to sign all requests to dropbox
|
14 |
-
*
|
15 |
-
* This classes use the Zend_Oauth package.
|
16 |
-
*/
|
17 |
-
class Dropbox_OAuth_Zend extends Dropbox_OAuth {
|
18 |
-
|
19 |
-
/**
|
20 |
-
* OAuth object
|
21 |
-
*
|
22 |
-
* @var Zend_Oauth_Consumer
|
23 |
-
*/
|
24 |
-
protected $oAuth;
|
25 |
-
/**
|
26 |
-
* OAuth consumer key
|
27 |
-
*
|
28 |
-
* We need to keep this around for later.
|
29 |
-
*
|
30 |
-
* @var string
|
31 |
-
*/
|
32 |
-
protected $consumerKey;
|
33 |
-
/**
|
34 |
-
*
|
35 |
-
* @var Zend_Oauth_Token
|
36 |
-
*/
|
37 |
-
protected $zend_oauth_token;
|
38 |
-
|
39 |
-
/**
|
40 |
-
* Constructor
|
41 |
-
*
|
42 |
-
* @param string $consumerKey
|
43 |
-
* @param string $consumerSecret
|
44 |
-
*/
|
45 |
-
public function __construct($consumerKey, $consumerSecret) {
|
46 |
-
if (!class_exists('Zend_Oauth_Consumer')) {
|
47 |
-
// We're going to try to load in manually
|
48 |
-
include 'Zend/Oauth/Consumer.php';
|
49 |
-
}
|
50 |
-
if (!class_exists('Zend_Oauth_Consumer'))
|
51 |
-
throw new Dropbox_Exception('The Zend_Oauth_Consumer class could not be found!');
|
52 |
-
$this->OAuth = new Zend_Oauth_Consumer(array(
|
53 |
-
"consumerKey" => $consumerKey,
|
54 |
-
"consumerSecret" => $consumerSecret,
|
55 |
-
"requestTokenUrl" => self::URI_REQUEST_TOKEN,
|
56 |
-
"accessTokenUrl" => self::URI_ACCESS_TOKEN,
|
57 |
-
"authorizeUrl" => self::URI_AUTHORIZE,
|
58 |
-
"signatureMethod" => "HMAC-SHA1",
|
59 |
-
));
|
60 |
-
$this->consumerKey = $consumerKey;
|
61 |
-
}
|
62 |
-
|
63 |
-
/**
|
64 |
-
* Sets the request token and secret.
|
65 |
-
*
|
66 |
-
* The tokens can also be passed as an array into the first argument.
|
67 |
-
* The array must have the elements token and token_secret.
|
68 |
-
*
|
69 |
-
* @param string|array $token
|
70 |
-
* @param string $token_secret
|
71 |
-
* @return void
|
72 |
-
*/
|
73 |
-
public function setToken($token, $token_secret = null) {
|
74 |
-
if (is_a($token, "Zend_Oauth_Token")) {
|
75 |
-
if (is_a($token, "Zend_Oauth_Token_Access")) {
|
76 |
-
$this->OAuth->setToken($token);
|
77 |
-
}
|
78 |
-
$this->zend_oauth_token = $token;
|
79 |
-
return parent::setToken($token->getToken(), $token->getTokenSecret());
|
80 |
-
} elseif (is_string($token) && is_null($token_secret)) {
|
81 |
-
return $this->setToken(unserialize($token));
|
82 |
-
} elseif (isset($token['zend_oauth_token'])) {
|
83 |
-
return $this->setToken(unserialize($token['zend_oauth_token']));
|
84 |
-
} else {
|
85 |
-
parent::setToken($token, $token_secret);
|
86 |
-
return;
|
87 |
-
}
|
88 |
-
}
|
89 |
-
|
90 |
-
/**
|
91 |
-
* Fetches a secured oauth url and returns the response body.
|
92 |
-
*
|
93 |
-
* @param string $uri
|
94 |
-
* @param mixed $arguments
|
95 |
-
* @param string $method
|
96 |
-
* @param array $httpHeaders
|
97 |
-
* @return string
|
98 |
-
*/
|
99 |
-
public function fetch($uri, $arguments = array(), $method = 'GET', $httpHeaders = array()) {
|
100 |
-
$token = $this->OAuth->getToken();
|
101 |
-
if (!is_a($token, "Zend_Oauth_Token")) {
|
102 |
-
if (is_a($this->zend_oauth_token, "Zend_Oauth_Token_Access")) {
|
103 |
-
$token = $this->zend_oauth_token;
|
104 |
-
} else {
|
105 |
-
$token = new Zend_Oauth_Token_Access();
|
106 |
-
$token->setToken($this->oauth_token);
|
107 |
-
$token->setTokenSecret($this->oauth_token_secret);
|
108 |
-
}
|
109 |
-
}
|
110 |
-
/* @var $token Zend_Oauth_Token_Access */
|
111 |
-
$oauthOptions = array(
|
112 |
-
'consumerKey' => $this->consumerKey,
|
113 |
-
'signatureMethod' => "HMAC-SHA1",
|
114 |
-
'consumerSecret' => $this->OAuth->getConsumerSecret(),
|
115 |
-
);
|
116 |
-
$config = array("timeout" => 15);
|
117 |
-
|
118 |
-
/* @var $consumerRequest Zend_Oauth_Client */
|
119 |
-
$consumerRequest = $token->getHttpClient($oauthOptions);
|
120 |
-
$consumerRequest->setMethod($method);
|
121 |
-
if (is_array($arguments)) {
|
122 |
-
$consumerRequest->setUri($uri);
|
123 |
-
if ($method == "GET") {
|
124 |
-
foreach ($arguments as $param => $value) {
|
125 |
-
$consumerRequest->setParameterGet($param, $value);
|
126 |
-
}
|
127 |
-
} else {
|
128 |
-
foreach ($arguments as $param => $value) {
|
129 |
-
$consumerRequest->setParameterPost($param, $value);
|
130 |
-
}
|
131 |
-
}
|
132 |
-
} elseif (is_string($arguments)) {
|
133 |
-
preg_match("/\?file=(.*)$/i", $uri, $matches);
|
134 |
-
if (isset($matches[1])) {
|
135 |
-
$uri = str_replace($matches[0], "", $uri);
|
136 |
-
$filename = $matches[1];
|
137 |
-
$uri = Zend_Uri::factory($uri);
|
138 |
-
$uri->addReplaceQueryParameters(array("file" => $filename));
|
139 |
-
$consumerRequest->setParameterGet("file", $filename);
|
140 |
-
}
|
141 |
-
$consumerRequest->setUri($uri);
|
142 |
-
$consumerRequest->setRawData($arguments);
|
143 |
-
} elseif (is_resource($arguments)) {
|
144 |
-
$consumerRequest->setUri($uri);
|
145 |
-
/** Placeholder for Oauth streaming support. */
|
146 |
-
}
|
147 |
-
if (count($httpHeaders)) {
|
148 |
-
foreach ($httpHeaders as $k => $v) {
|
149 |
-
$consumerRequest->setHeaders($k, $v);
|
150 |
-
}
|
151 |
-
}
|
152 |
-
$response = $consumerRequest->request();
|
153 |
-
$body = Zend_Json::decode($response->getBody());
|
154 |
-
switch ($response->getStatus()) {
|
155 |
-
// Not modified
|
156 |
-
case 304 :
|
157 |
-
return array(
|
158 |
-
'httpStatus' => 304,
|
159 |
-
'body' => null,
|
160 |
-
);
|
161 |
-
break;
|
162 |
-
case 403 :
|
163 |
-
throw new Dropbox_Exception_Forbidden('Forbidden.
|
164 |
-
This could mean a bad OAuth request, or a file or folder already existing at the target location.
|
165 |
-
' . $body["error"] . "\n");
|
166 |
-
case 404 :
|
167 |
-
throw new Dropbox_Exception_NotFound('Resource at uri: ' . $uri . ' could not be found. ' .
|
168 |
-
$body["error"] . "\n");
|
169 |
-
case 507 :
|
170 |
-
throw new Dropbox_Exception_OverQuota('This dropbox is full. ' .
|
171 |
-
$body["error"] . "\n");
|
172 |
-
}
|
173 |
-
|
174 |
-
return array(
|
175 |
-
'httpStatus' => $response->getStatus(),
|
176 |
-
'body' => $response->getBody(),
|
177 |
-
);
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Requests the OAuth request token.
|
182 |
-
*
|
183 |
-
* @return void
|
184 |
-
*/
|
185 |
-
public function getRequestToken() {
|
186 |
-
$token = $this->OAuth->getRequestToken();
|
187 |
-
$this->setToken($token);
|
188 |
-
return $this->getToken();
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Requests the OAuth access tokens.
|
193 |
-
*
|
194 |
-
* This method requires the 'unauthorized' request tokens
|
195 |
-
* and, if successful will set the authorized request tokens.
|
196 |
-
*
|
197 |
-
* @return void
|
198 |
-
*/
|
199 |
-
public function getAccessToken() {
|
200 |
-
if (is_a($this->zend_oauth_token, "Zend_Oauth_Token_Request")) {
|
201 |
-
$requestToken = $this->zend_oauth_token;
|
202 |
-
} else {
|
203 |
-
$requestToken = new Zend_Oauth_Token_Request();
|
204 |
-
$requestToken->setToken($this->oauth_token);
|
205 |
-
$requestToken->setTokenSecret($this->oauth_token_secret);
|
206 |
-
}
|
207 |
-
$token = $this->OAuth->getAccessToken($_GET, $requestToken);
|
208 |
-
$this->setToken($token);
|
209 |
-
return $this->getToken();
|
210 |
-
}
|
211 |
-
|
212 |
-
/**
|
213 |
-
* Returns the oauth request tokens as an associative array.
|
214 |
-
*
|
215 |
-
* The array will contain the elements 'token' and 'token_secret' and the serialized
|
216 |
-
* Zend_Oauth_Token object.
|
217 |
-
*
|
218 |
-
* @return array
|
219 |
-
*/
|
220 |
-
public function getToken() {
|
221 |
-
//$token = $this->OAuth->getToken();
|
222 |
-
//return serialize($token);
|
223 |
-
return array(
|
224 |
-
'token' => $this->oauth_token,
|
225 |
-
'token_secret' => $this->oauth_token_secret,
|
226 |
-
'zend_oauth_token' => serialize($this->zend_oauth_token),
|
227 |
-
);
|
228 |
-
}
|
229 |
-
|
230 |
-
/**
|
231 |
-
* Returns the authorization url
|
232 |
-
*
|
233 |
-
* Overloading Dropbox_OAuth to use the built in functions in Zend_Oauth
|
234 |
-
*
|
235 |
-
* @param string $callBack Specify a callback url to automatically redirect the user back
|
236 |
-
* @return string
|
237 |
-
*/
|
238 |
-
public function getAuthorizeUrl($callBack = null) {
|
239 |
-
if ($callBack)
|
240 |
-
$this->OAuth->setCallbackUrl($callBack);
|
241 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
|
libs/Dropbox/autoload.php
DELETED
@@ -1,29 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* This file registers a new autoload function using spl_autoload_register.
|
5 |
-
*
|
6 |
-
* @package Dropbox
|
7 |
-
* @copyright Copyright (C) 2010 Rooftop Solutions. All rights reserved.
|
8 |
-
* @author Evert Pot (http://www.rooftopsolutions.nl/)
|
9 |
-
* @license http://code.google.com/p/dropbox-php/wiki/License MIT
|
10 |
-
*/
|
11 |
-
|
12 |
-
/**
|
13 |
-
* Autoloader function
|
14 |
-
*
|
15 |
-
* @param $className string
|
16 |
-
* @return void
|
17 |
-
*/
|
18 |
-
function Dropbox_autoload($className) {
|
19 |
-
|
20 |
-
if(strpos($className,'Dropbox_')===0) {
|
21 |
-
|
22 |
-
include dirname(__FILE__) . '/' . str_replace('_','/',substr($className,8)) . '.php';
|
23 |
-
|
24 |
-
}
|
25 |
-
|
26 |
-
}
|
27 |
-
|
28 |
-
spl_autoload_register('Dropbox_autoload');
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
libs/aws/lib/requestcore/cacert.pem
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
##
|
2 |
## ca-bundle.crt -- Bundle of CA Root Certificates
|
3 |
##
|
4 |
-
## Certificate data from Mozilla as of:
|
5 |
##
|
6 |
## This is a bundle of X.509 certificates of public Certificate Authorities
|
7 |
## (CA). These were automatically extracted from Mozilla's root certificates
|
@@ -49,7 +49,7 @@
|
|
49 |
# the terms of any one of the MPL, the GPL or the LGPL.
|
50 |
#
|
51 |
# ***** END LICENSE BLOCK *****
|
52 |
-
# @(#) $RCSfile: certdata.txt,v $ $Revision: 1.
|
53 |
|
54 |
GTE CyberTrust Global Root
|
55 |
==========================
|
@@ -2247,36 +2247,6 @@ IGfE7vmLV2H0knZ9P4SNVbfo5azV8fUZVqZa+5Acr5Pr5RzUZ5ddBA6+C4OmF4O5MBKgxTMVBbkN
|
|
2247 |
+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
|
2248 |
-----END CERTIFICATE-----
|
2249 |
|
2250 |
-
DigiNotar Root CA
|
2251 |
-
=================
|
2252 |
-
-----BEGIN CERTIFICATE-----
|
2253 |
-
MIIFijCCA3KgAwIBAgIQDHbanJEMTiye/hXQWJM8TDANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQG
|
2254 |
-
EwJOTDESMBAGA1UEChMJRGlnaU5vdGFyMRowGAYDVQQDExFEaWdpTm90YXIgUm9vdCBDQTEgMB4G
|
2255 |
-
CSqGSIb3DQEJARYRaW5mb0BkaWdpbm90YXIubmwwHhcNMDcwNTE2MTcxOTM2WhcNMjUwMzMxMTgx
|
2256 |
-
OTIxWjBfMQswCQYDVQQGEwJOTDESMBAGA1UEChMJRGlnaU5vdGFyMRowGAYDVQQDExFEaWdpTm90
|
2257 |
-
YXIgUm9vdCBDQTEgMB4GCSqGSIb3DQEJARYRaW5mb0BkaWdpbm90YXIubmwwggIiMA0GCSqGSIb3
|
2258 |
-
DQEBAQUAA4ICDwAwggIKAoICAQCssFjBAL3YIQgLK5r+blYwBZ8bd5AQQVzDDYcRd46B8cp86Yxq
|
2259 |
-
7Th0Nbva3/m7wAk3tJZzgX0zGpg595NvlX89ubF1h7pRSOiLcD6VBMXYtsMW2YiwsYcdcNqGtA8U
|
2260 |
-
i3rPENF0NqISe3eGSnnme98CEWilToauNFibJBN4ViIlHgGLS1Fx+4LMWZZpiFpoU8W5DQI3y0u8
|
2261 |
-
ZkqQfioLBQftFl9VkHXYRskbg+IIvvEjzJkd1ioPgyAVWCeCLvriIsJJsbkBgWqdbZ1Ad2h2TiEq
|
2262 |
-
bYRAhU52mXyC8/O3AlnUJgEbjt+tUwbRrhjd4rI6y9eIOI6sWym5GdOY+RgDz0iChmYLG2kPyes4
|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dNw23yCIywWMQzGNgeQerEfZ1jEO1hZibCMjFCz2IbLaKPE
|
2276 |
-
CudpSyDOwR5WS5WpI2jYMNjD67BVUc3l/Su49bsRn1NU9jQZjHkJNsphFyUXC4KYcwx3dMPVDceo
|
2277 |
-
EkzHp1RxRy4sGn3J4ys7SN4nhKdjNrN9j6BkOSQNPXuHr2ZcdBtLc7LljPCGmbjlxd+Ewbfr
|
2278 |
-
-----END CERTIFICATE-----
|
2279 |
-
|
2280 |
Network Solutions Certificate Authority
|
2281 |
=======================================
|
2282 |
-----BEGIN CERTIFICATE-----
|
@@ -2344,30 +2314,6 @@ FAkK+qDmfQjGGoe9GKhzvSbKYAydzpmfz1wPMOG+FDHqAjAU9JM8SaczepBGR7NjfRObTrdvGDeA
|
|
2344 |
U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
|
2345 |
-----END CERTIFICATE-----
|
2346 |
|
2347 |
-
MD5 Collisions Forged Rogue CA 25c3
|
2348 |
-
===================================
|
2349 |
-
-----BEGIN CERTIFICATE-----
|
2350 |
-
MIIEMjCCA5ugAwIBAgIBQjANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT
|
2351 |
-
RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp
|
2352 |
-
bmVzcyBDQS0xMB4XDTA0MDczMTAwMDAwMVoXDTA0MDkwMjAwMDAwMVowPDE6MDgGA1UEAxMxTUQ1
|
2353 |
-
IENvbGxpc2lvbnMgSW5jLiAoaHR0cDovL3d3dy5waHJlZWRvbS5vcmcvbWQ1KTCBnzANBgkqhkiG
|
2354 |
-
9w0BAQEFAAOBjQAwgYkCgYEAuqZZySwo1iqw+O2fRqSkN+4OGWhZ0bMDmVHWFppeN2sV4A5L9YRk
|
2355 |
-
+KPbQW811ZsVH9vEOFJwgZdej6C193458DKsHq1E0rP6SMPOkZvs9Jx84Vr1yDdrm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
K8bNs7SPYtD+t8UmckTt9phbrsvRlfXaCL5oRrF1yOwdjx56lPGqU3iiRa5U6tGedMh2Zw==
|
2369 |
-
-----END CERTIFICATE-----
|
2370 |
-
|
2371 |
IGC/A
|
2372 |
=====
|
2373 |
-----BEGIN CERTIFICATE-----
|
@@ -3490,328 +3436,6 @@ c5iJWzouE4gev8CSlDQb4ye3ix5vQv/n6TebUB0tovkC7stYWDpxvGjjqsGvHCgfotwjZT+B6q6Z
|
|
3490 |
09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
|
3491 |
-----END CERTIFICATE-----
|
3492 |
|
3493 |
-
Bogus Mozilla Addons
|
3494 |
-
====================
|
3495 |
-
-----BEGIN CERTIFICATE-----
|
3496 |
-
MIIF+DCCBOCgAwIBAgIRAJI51TSPQNFpWnRUcOHyP0MwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV
|
3497 |
-
BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo
|
3498 |
-
ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w
|
3499 |
-
HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz
|
3500 |
-
NTk1OVowgeIxCzAJBgNVBAYTAlVTMQ4wDAYDVQQREwUzODQ3NzEQMA4GA1UECBMHRmxvcmlkYTEQ
|
3501 |
-
MA4GA1UEBxMHRW5nbGlzaDEXMBUGA1UECRMOU2VhIFZpbGxhZ2UgMTAxFDASBgNVBAoTC0dvb2ds
|
3502 |
-
ZSBMdGQuMRMwEQYDVQQLEwpUZWNoIERlcHQuMSgwJgYDVQQLEx9Ib3N0ZWQgYnkgR1RJIEdyb3Vw
|
3503 |
-
IENvcnBvcmF0aW9uMRQwEgYDVQQLEwt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G9jYS5jb20v
|
3516 |
-
VVROQWRkVHJ1c3RTZXJ2ZXJDQS5jcnQwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2Nh
|
3517 |
-
LmNvbTA1BgNVHREELjAsghJhZGRvbnMubW96aWxsYS5vcmeCFnd3dy5hZGRvbnMubW96aWxsYS5v
|
3518 |
-
cmcwDQYJKoZIhvcNAQEFBQADggEBADM7YxX8sewULJPddZTegVrZTpm++0qkOVVNoUB63hMqh6k3
|
3519 |
-
z+jV+63Re21vjCCHglTmV0m8ICiEzdYB2ZOLF24jZuWEyIA/xqFwgOTsTR35/JFac2IpmvcgHGHg
|
3520 |
-
izmfyrx+jd282bHjn57fFVORIVIL2RojD2Y226yTlkqjpSLPKfeimaj2ttlArtl+tvZYLpusNspk
|
3521 |
-
j2VS3IacgqtuUEvaX/oFAIgwDt6NVr+BR409BuKyYpJnj57ImrLlBrhwJLh3fCMKOMN5CNixUZ2s
|
3522 |
-
lRHHQBeeoxyP8hGnaCfaSQWEGHxYLQFnXOWfoSm7SjlFL78Rqnmi7bTUtWVDt5NGitM=
|
3523 |
-
-----END CERTIFICATE-----
|
3524 |
-
|
3525 |
-
Bogus Global Trustee
|
3526 |
-
====================
|
3527 |
-
-----BEGIN CERTIFICATE-----
|
3528 |
-
MIIG3TCCBcWgAwIBAgIRANjzX063hystqwaS4xU4L7AwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV
|
3529 |
-
BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo
|
3530 |
-
ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w
|
3531 |
-
HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz
|
3532 |
-
NTk1OVowgeMxCzAJBgNVBAY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bYITd3d3Lm1haWwuZ29vZ2xlLmNvbTANBgkqhkiG
|
3586 |
-
9w0BAQUFAAOCAQEAZwYICifFk24C8t4XP9DTG3z/tc16x3fHvt8SyhnesBNXDAORxHlSz3+3XlUg
|
3587 |
-
hEnd9dApLw4E2lmeDhOf9MAym/+hESQql6PyPz0qa6itjBl1lQ4dJf1PxHoVwx3HE0DIDb6XYHKm
|
3588 |
-
/iW+j+zVpobDIVxZUtlqC1yfS961+ezi9MXMYlN2iWXkKdq3v5bgYI0NtwlV1kBVHcHyliF1r4mG
|
3589 |
-
H12BlykoHinXlsEgAzJ7ADtqNxdao7MabzI7bvGjXaurzCrLMAwfNSOLaURc6qwoYO2ra2Oe9pK8
|
3590 |
-
vZpaJkzFmLgOGT78BTHjFtn9kAUDhsZXAR9/eKDPM2qqZmsi0KdJIw==
|
3591 |
-
-----END CERTIFICATE-----
|
3592 |
-
|
3593 |
-
Bogus Google
|
3594 |
-
============
|
3595 |
-
-----BEGIN CERTIFICATE-----
|
3596 |
-
MIIF5DCCBMygAwIBAgIRAPXIavNhYvE6ZPVPbclYfAYwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV
|
3597 |
-
BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo
|
3598 |
-
ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w
|
3599 |
-
HQYDVQQDExZVVE4tVVNFUkZpcnN0LUhhcmR3YXJlMB4XDTExMDMxNTAwMDAwMFoXDTE0MDMxNDIz
|
3600 |
-
NTk1OVowgd4xCzAJBgNVBAYTAlVTMQ4wDAYDVQQREwUzODQ3NzEQMA4GA1UECBMHRmxvcmlkYTEQ
|
3601 |
-
MA4GA1UEBxMHRW5nbGlzaDEXMBUGA1UECRMOU2VhIFZpbGxhZ2UgMTAxFDASBgNVBAoTC0dvb2ds
|
3602 |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hjBodHRwOi8vY3JsLmNvbW9kby5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmww
|
3615 |
-
cQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5B
|
3616 |
-
ZGRUcnVzdFNlcnZlckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t
|
3617 |
-
MCUGA1UdEQQeMByCDnd3dy5nb29nbGUuY29tggpnb29nbGUuY29tMA0GCSqGSIb3DQEBBQUAA4IB
|
3618 |
-
AQBxwJk/Xva9M/+eFsuov91w+dJTOzauyRfIrl5N3WL3t9M+d6P+wHsytcmUBVJQ8l89eYRJT11s
|
3619 |
-
sNdZvdRsiPr8xWWG6yhSokL2fLxqxwcuJdGQYiDGjVHCLEU5TgPa9xjozAo62UXYbG40i2KcThX5
|
3620 |
-
Q+7ll8A/rTUTxSsGx0H94vd+Ra2b0eFm7fh6S5Q5ei/r6D9D2DXWVvp0523m7axlhP7QTQYS3tpZ
|
3621 |
-
ADwJXM+IS+g9tBUhksxtplHijpfx9IJGy8RTXtpcnWWSAWWJAOW2mf8mQPEvGTEIGrFnVYYNrjUz
|
3622 |
-
hryXSJLXlmD4zvyW64fEc8yUm1hb83qkJxPWT/Rp
|
3623 |
-
-----END CERTIFICATE-----
|
3624 |
-
|
3625 |
-
Bogus Skype
|
3626 |
-
===========
|
3627 |
-
-----BEGIN CERTIFICATE-----
|
3628 |
-
MIIF7zCCBNegAwIBAgIRAOkCi5V45BXcGnEKK4gVREcwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV
|
3629 |
-
BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo
|
3630 |
-
ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w
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MBQGCCsGAQUFBwMBBggrBgEFBQcDAjBGBgNVHSAEPzA9MDsGDCsGAQQBsjEBAgED
|
3644 |
-
BDArMCkGCCsGAQUFBwIBFh1odHRwczovL3NlY3VyZS5jb21vZG8uY29tL0NQUzB7BgNVHR8EdDBy
|
3645 |
-
MDigNqA0hjJodHRwOi8vY3JsLmNvbW9kb2NhLmNvbS9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNy
|
3646 |
-
bDA2oDSgMoYwaHR0cDovL2NybC5jb21vZG8ubmV0L1VUTi1VU0VSRmlyc3QtSGFyZHdhcmUuY3Js
|
3647 |
-
MHEGCCsGAQUFBwEBBGUwYzA7BggrBgEFBQcwAoYvaHR0cDovL2NydC5jb21vZG9jYS5jb20vVVRO
|
3648 |
-
QWRkVHJ1c3RTZXJ2ZXJDQS5jcnQwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2NhLmNv
|
3649 |
-
bTAvBgNVHREEKDAmgg9sb2dpbi5za3lwZS5jb22CE3d3dy5sb2dpbi5za3lwZS5jb20wDQYJKoZI
|
3650 |
-
hvcNAQEFBQADggEBAAjygXWRu84SBBjCTVr7RpAKVET08t0HgfAfpnpvn8+4DixPnMSa9aj2uqTJ
|
3651 |
-
el2x4lrKPPpgqGg+y7ot4s3WtuSSPGmtV+qoLzgQhHLlaHHtvutuGO9jer7nJP/AY/1YO0yBktgp
|
3652 |
-
q441XdfTCWuF09VzBUTi5buDUxDL8s+3buFpt6GSZMXPzYK7NqA4rdck31P8P2K3t9XHV+OTMXCO
|
3653 |
-
JImGymMrObpd2Wpg7KFOiv5T+F6S3y9cJhdtA30CDw+qQ2dtsGK/flPdzOx4c5XlpfYAowT9PwQq
|
3654 |
-
s5jFtwMc28lQq7AFHR6+VrTPPkITlJ755wGBpXhvDHp2rAWG7KzCEaw=
|
3655 |
-
-----END CERTIFICATE-----
|
3656 |
-
|
3657 |
-
Bogus Yahoo 1
|
3658 |
-
=============
|
3659 |
-
-----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AyhjBodHRwOi8vY3JsLmNvbW9kby5uZXQvVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmww
|
3743 |
-
cQYIKwYBBQUHAQEEZTBjMDsGCCsGAQUFBzAChi9odHRwOi8vY3J0LmNvbW9kb2NhLmNvbS9VVE5B
|
3744 |
-
ZGRUcnVzdFNlcnZlckNBLmNydDAkBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29t
|
3745 |
-
MBoGA1UdEQQTMBGCD2xvZ2luLnlhaG9vLmNvbTANBgkqhkiG9w0BAQUFAAOCAQEAU2mYjihOnCtb
|
3746 |
-
Hcxrdyg9u/qlTn5WKaTqEOL05i0G0YTbI86X82i2DzreFQskHZHjbC4wt+lwsMNGgPDTsVG/T9Z4
|
3747 |
-
oPysxs8xBGPiNFUFSj32MLrzM+W60pbz1bG2k4kapGi+fu1jtBpIwFPko/A5DDKSx0MNGnHt0EaT
|
3748 |
-
v5NibDNLzTYNaV67bJaZIWnES2dy22xquPdo7cWPrWNllQpM4PkPfjc9qtSTumcJw6WkDQNabdUL
|
3749 |
-
/vBAFLT2uGl8bcIyS5+1GudGrkxaK6p6XpBXlfrbZgIgHmppZhWcwrb1vFC1/UXHH2i0R1msxBso
|
3750 |
-
k05SUxIDWEtxg59m5qx5SP7+Rw==
|
3751 |
-
-----END CERTIFICATE-----
|
3752 |
-
|
3753 |
-
Bogus live.com
|
3754 |
-
==============
|
3755 |
-
-----BEGIN CERTIFICATE-----
|
3756 |
-
MIIF7DCCBNSgAwIBAgIRALC3Ez7Qlvm1b66RyHS9OsAwDQYJKoZIhvcNAQEFBQAwgZcxCzAJBgNV
|
3757 |
-
BAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkxHjAcBgNVBAoTFVRo
|
3758 |
-
ZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8w
|
3759 |
-
H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Ldj3+R
|
3813 |
-
-----END CERTIFICATE-----
|
3814 |
-
|
3815 |
Go Daddy Root Certificate Authority - G2
|
3816 |
========================================
|
3817 |
-----BEGIN CERTIFICATE-----
|
@@ -3985,3 +3609,113 @@ mS1FhIrlQgnXdAIv94nYmem8J9RHjboNRhx3zxSkHLmkMcScKHQDNP8zGSal6Q10tz6XxnboJ5aj
|
|
3985 |
Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
|
3986 |
03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
|
3987 |
-----END CERTIFICATE-----
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
##
|
2 |
## ca-bundle.crt -- Bundle of CA Root Certificates
|
3 |
##
|
4 |
+
## Certificate data from Mozilla as of: Fri Sep 2 23:34:57 2011
|
5 |
##
|
6 |
## This is a bundle of X.509 certificates of public Certificate Authorities
|
7 |
## (CA). These were automatically extracted from Mozilla's root certificates
|
49 |
# the terms of any one of the MPL, the GPL or the LGPL.
|
50 |
#
|
51 |
# ***** END LICENSE BLOCK *****
|
52 |
+
# @(#) $RCSfile: certdata.txt,v $ $Revision: 1.79 $ $Date: 2011/09/02 19:40:56 $
|
53 |
|
54 |
GTE CyberTrust Global Root
|
55 |
==========================
|
2247 |
+8cFduPYSo38NBejxiEovjBFMR7HeL5YYTisO+IBZQ==
|
2248 |
-----END CERTIFICATE-----
|
2249 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2250 |
Network Solutions Certificate Authority
|
2251 |
=======================================
|
2252 |
-----BEGIN CERTIFICATE-----
|
2314 |
U/7dIOA1mjbRxwG55tzd8/8dLDoWV9mSOdY=
|
2315 |
-----END CERTIFICATE-----
|
2316 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2317 |
IGC/A
|
2318 |
=====
|
2319 |
-----BEGIN CERTIFICATE-----
|
3436 |
09gwzxMNTxXJhLynSC34MCN32EZLeW32jO06f2ARePTpm67VVMB0gNELQp/B
|
3437 |
-----END CERTIFICATE-----
|
3438 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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WnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI
|
3610 |
03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw=
|
3611 |
-----END CERTIFICATE-----
|
3612 |
+
|
3613 |
+
Certinomis - Autorité Racine
|
3614 |
+
=============================
|
3615 |
+
-----BEGIN CERTIFICATE-----
|
3616 |
+
MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK
|
3617 |
+
Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxJjAkBgNVBAMMHUNlcnRpbm9taXMg
|
3618 |
+
LSBBdXRvcml0w6kgUmFjaW5lMB4XDTA4MDkxNzA4Mjg1OVoXDTI4MDkxNzA4Mjg1OVowYzELMAkG
|
3619 |
+
A1UEBhMCRlIxEzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMSYw
|
3620 |
+
JAYDVQQDDB1DZXJ0aW5vbWlzIC0gQXV0b3JpdMOpIFJhY2luZTCCAiIwDQYJKoZIhvcNAQEBBQAD
|
3621 |
+
ggIPADCCAgoCggIBAJ2Fn4bT46/HsmtuM+Cet0I0VZ35gb5j2CN2DpdUzZlMGvE5x4jYF1AMnmHa
|
3622 |
+
wE5V3udauHpOd4cN5bjr+p5eex7Ezyh0x5P1FMYiKAT5kcOrJ3NqDi5N8y4oH3DfVS9O7cdxbwly
|
3623 |
+
Lu3VMpfQ8Vh30WC8Tl7bmoT2R2FFK/ZQpn9qcSdIhDWerP5pqZ56XjUl+rSnSTV3lqc2W+HN3yNw
|
3624 |
+
2F1MpQiD8aYkOBOo7C+ooWfHpi2GR+6K/OybDnT0K0kCe5B1jPyZOQE51kqJ5Z52qz6WKDgmi92N
|
3625 |
+
jMD2AR5vpTESOH2VwnHu7XSu5DaiQ3XV8QCb4uTXzEIDS3h65X27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|
3638 |
+
qkPFMTFYvZbF6nVsmnWxTfj3l/+WFvKXTej28xH5On2KOG4Ey+HTRRWqpdEdnV1j6CTmNhTih60b
|
3639 |
+
WfVEm/vXd3wfAXBioSAaosUaKPQhA+4u2cGA6rnZgtZbdsLLO7XSAPCjDuGtbkD326C00EauFddE
|
3640 |
+
wk01+dIL8hf2rGbVJLJP0RyZwG71fet0BLj5TXcJ17TPBzAJ8bgAVtkXFhYKK4bfjwEZGuW7gmP/
|
3641 |
+
vgt2Fl43N+bYdJeimUV5
|
3642 |
+
-----END CERTIFICATE-----
|
3643 |
+
|
3644 |
+
Root CA Generalitat Valenciana
|
3645 |
+
==============================
|
3646 |
+
-----BEGIN CERTIFICATE-----
|
3647 |
+
MIIGizCCBXOgAwIBAgIEO0XlaDANBgkqhkiG9w0BAQUFADBoMQswCQYDVQQGEwJFUzEfMB0GA1UE
|
3648 |
+
ChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290
|
3649 |
+
IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwHhcNMDEwNzA2MTYyMjQ3WhcNMjEwNzAxMTUyMjQ3
|
3650 |
+
WjBoMQswCQYDVQQGEwJFUzEfMB0GA1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UE
|
3651 |
+
CxMGUEtJR1ZBMScwJQYDVQQDEx5Sb290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmEwggEiMA0G
|
3652 |
+
CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDGKqtXETcvIorKA3Qdyu0togu8M1JAJke+WmmmO3I2
|
3653 |
+
F0zo37i7L3bhQEZ0ZQKQUgi0/6iMweDHiVYQOTPvaLRfX9ptI6GJXiKjSgbwJ/BXufjpTjJ3Cj9B
|
3654 |
+
ZPPrZe52/lSqfR0grvPXdMIKX/UIKFIIzFVd0g/bmoGlu6GzwZTNVOAydT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ALgBwAGsAaQAuAGcAdgBhAC4AZQBzAC8AYwBwAHMwJQYIKwYBBQUHAgEWGWh0
|
3668 |
+
dHA6Ly93d3cucGtpLmd2YS5lcy9jcHMwHQYDVR0OBBYEFHs100DSHHgZZu90ECjcPk+yeAT8MIGV
|
3669 |
+
BgNVHSMEgY0wgYqAFHs100DSHHgZZu90ECjcPk+yeAT8oWykajBoMQswCQYDVQQGEwJFUzEfMB0G
|
3670 |
+
A1UEChMWR2VuZXJhbGl0YXQgVmFsZW5jaWFuYTEPMA0GA1UECxMGUEtJR1ZBMScwJQYDVQQDEx5S
|
3671 |
+
b290IENBIEdlbmVyYWxpdGF0IFZhbGVuY2lhbmGCBDtF5WgwDQYJKoZIhvcNAQEFBQADggEBACRh
|
3672 |
+
TvW1yEICKrNcda3FbcrnlD+laJWIwVTAEGmiEi8YPyVQqHxK6sYJ2fR1xkDar1CdPaUWu20xxsdz
|
3673 |
+
Ckj+IHLtb8zog2EWRpABlUt9jppSCS/2bxzkoXHPjCpaF3ODR00PNvsETUlR4hTJZGH71BTg9J63
|
3674 |
+
NI8KJr2XXPR5OkowGcytT6CYirQxlyric21+eLj4iIlPsSKRZEv1UN4D2+XFducTZnV+ZfsBn5OH
|
3675 |
+
iJ35Rld8TWCvmHMTI6QgkYH60GFmuH3Rr9ZvHmw96RH9qfmCIoaZM3Fa6hlXPZHNqcCjbgcTpsnt
|
3676 |
+
+GijnsNacgmHKNHEc8RzGF9QdRYxn7fofMM=
|
3677 |
+
-----END CERTIFICATE-----
|
3678 |
+
|
3679 |
+
A-Trust-nQual-03
|
3680 |
+
================
|
3681 |
+
-----BEGIN CERTIFICATE-----
|
3682 |
+
MIIDzzCCAregAwIBAgIDAWweMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJBVDFIMEYGA1UE
|
3683 |
+
Cgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBpbSBlbGVrdHIuIERhdGVudmVy
|
3684 |
+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T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZd
|
3697 |
+
JXDRZslo+S4RFGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS
|
3698 |
+
mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmEDNuxUCAKGkq6
|
3699 |
+
ahq97BvIxYSazQ==
|
3700 |
+
-----END CERTIFICATE-----
|
3701 |
+
|
3702 |
+
TWCA Root Certification Authority
|
3703 |
+
=================================
|
3704 |
+
-----BEGIN CERTIFICATE-----
|
3705 |
+
MIIDezCCAmOgAwIBAgIBATANBgkqhkiG9w0BAQUFADBfMQswCQYDVQQGEwJUVzESMBAGA1UECgwJ
|
3706 |
+
VEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NBIFJvb3QgQ2VydGlmaWNh
|
3707 |
+
dGlvbiBBdXRob3JpdHkwHhcNMDgwODI4MDcyNDMzWhcNMzAxMjMxMTU1OTU5WjBfMQswCQYDVQQG
|
3708 |
+
EwJUVzESMBAGA1UECgwJVEFJV0FOLUNBMRAwDgYDVQQLDAdSb290IENBMSowKAYDVQQDDCFUV0NB
|
3709 |
+
IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK
|
3710 |
+
AoIBAQCwfnK4pAOU5qfeCTiRShFAh6d8WWQUe7UREN3+v9XAu1bihSX0NXIP+FPQQeFEAcK0HMMx
|
3711 |
+
QhZHhTMidrIKbw/lJVBPhYa+v5guEGcevhEFhgWQxFnQfHgQsIBct+HHK3XLfJ+utdGdIzdjp9xC
|
3712 |
+
oi2SBBtQwXu4PhvJVgSLL1KbralW6cH/ralYhzC2gfeXRfwZVzsrb+RH9JlF/h3x+JejiB03HFyP
|
3713 |
+
4HYlmlD4oFT/RJB2I9IyxsOrBr/8+7/zrX2SYgJbKdM1o5OaQ2RgXbL6Mv87BK9NQGr5x+PvI/1r
|
3714 |
+
y+UPizgN7gr8/g+YnzAx3WxSZfmLgb4i4RxYA7qRG4kHAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIB
|
3715 |
+
BjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqOFsmjd6LWvJPelSDGRjjCDWmujANBgkqhkiG
|
3716 |
+
9w0BAQUFAAOCAQEAPNV3PdrfibqHDAhUaiBQkr6wQT25JmSDCi/oQMCXKCeCMErJk/9q56YAf4lC
|
3717 |
+
mtYR5VPOL8zy2gXE/uJQxDqGfczafhAJO5I1KlOy/usrBdlsXebQ79NqZp4VKIV66IIArB6nCWlW
|
3718 |
+
QtNoURi+VJq/REG6Sb4gumlc7rh3zc5sH62Dlhh9DrUUOYTxKOkto557HnpyWoOzeW/vtPzQCqVY
|
3719 |
+
T0bf+215WfKEIlKuD8z7fDvnaspHYcN6+NOSBB+4IIThNlQWx0DeO4pz3N/GCUzf7Nr/1FNCocny
|
3720 |
+
Yh0igzyXxfkZYiesZSLX0zzG5Y6yU8xJzrww/nsOM5D77dIUkR8Hrw==
|
3721 |
+
-----END CERTIFICATE-----
|
libs/aws/sdk.class.php
CHANGED
@@ -125,9 +125,9 @@ function __aws_sdk_ua_callback()
|
|
125 |
// INTERMEDIARY CONSTANTS
|
126 |
|
127 |
define('CFRUNTIME_NAME', 'aws-sdk-php');
|
128 |
-
define('CFRUNTIME_VERSION', '1.4');
|
129 |
// define('CFRUNTIME_BUILD', gmdate('YmdHis', filemtime(__FILE__))); // @todo: Hardcode for release.
|
130 |
-
define('CFRUNTIME_BUILD', '
|
131 |
define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . ' PHP/' . PHP_VERSION . ' ' . str_replace(' ', '_', php_uname('s')) . '/' . str_replace(' ', '_', php_uname('r')) . ' Arch/' . php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . ' Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback());
|
132 |
|
133 |
|
@@ -376,6 +376,7 @@ class CFRuntime
|
|
376 |
// Set default values
|
377 |
$this->key = null;
|
378 |
$this->secret_key = null;
|
|
|
379 |
|
380 |
// If both a key and secret key are passed in, use those.
|
381 |
if ($key && $secret_key)
|
@@ -415,7 +416,8 @@ class CFRuntime
|
|
415 |
// Use 'em if we've got 'em
|
416 |
if ($key && $secret_key && $token)
|
417 |
{
|
418 |
-
$this->
|
|
|
419 |
$this->auth_token = $token;
|
420 |
return true;
|
421 |
}
|
@@ -458,20 +460,12 @@ class CFRuntime
|
|
458 |
$this->auth_token = $session_credentials['SessionToken'];
|
459 |
|
460 |
// If both a key and secret key are passed in, use those.
|
461 |
-
if ($session_credentials['AccessKeyId'] && $session_credentials['SecretAccessKey'])
|
462 |
{
|
463 |
$this->key = $session_credentials['AccessKeyId'];
|
464 |
$this->secret_key = $session_credentials['SecretAccessKey'];
|
465 |
return true;
|
466 |
}
|
467 |
-
// If neither are passed in, look for the constants instead.
|
468 |
-
elseif (defined('AWS_KEY') && defined('AWS_SECRET_KEY'))
|
469 |
-
{
|
470 |
-
$this->key = AWS_KEY;
|
471 |
-
$this->secret_key = AWS_SECRET_KEY;
|
472 |
-
return true;
|
473 |
-
}
|
474 |
-
|
475 |
// Otherwise set the values to blank and return false.
|
476 |
else
|
477 |
{
|
@@ -480,6 +474,13 @@ class CFRuntime
|
|
480 |
}
|
481 |
}
|
482 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
483 |
public function cache_token($key, $secret_key)
|
484 |
{
|
485 |
$token = new AmazonSTS($key, $secret_key);
|
@@ -1365,7 +1366,7 @@ class CFRuntime
|
|
1365 |
case 'deflate':
|
1366 |
if (strpos($headers['_info']['url'], 'monitoring.') !== false)
|
1367 |
{
|
1368 |
-
//
|
1369 |
continue;
|
1370 |
}
|
1371 |
else
|
@@ -1573,6 +1574,8 @@ class CFLoader
|
|
1573 |
{
|
1574 |
require_once($path);
|
1575 |
}
|
|
|
|
|
1576 |
}
|
1577 |
}
|
1578 |
|
125 |
// INTERMEDIARY CONSTANTS
|
126 |
|
127 |
define('CFRUNTIME_NAME', 'aws-sdk-php');
|
128 |
+
define('CFRUNTIME_VERSION', '1.4.4');
|
129 |
// define('CFRUNTIME_BUILD', gmdate('YmdHis', filemtime(__FILE__))); // @todo: Hardcode for release.
|
130 |
+
define('CFRUNTIME_BUILD', '20111012191027');
|
131 |
define('CFRUNTIME_USERAGENT', CFRUNTIME_NAME . '/' . CFRUNTIME_VERSION . ' PHP/' . PHP_VERSION . ' ' . str_replace(' ', '_', php_uname('s')) . '/' . str_replace(' ', '_', php_uname('r')) . ' Arch/' . php_uname('m') . ' SAPI/' . php_sapi_name() . ' Integer/' . PHP_INT_MAX . ' Build/' . CFRUNTIME_BUILD . __aws_sdk_ua_callback());
|
132 |
|
133 |
|
376 |
// Set default values
|
377 |
$this->key = null;
|
378 |
$this->secret_key = null;
|
379 |
+
$this->auth_token = $token;
|
380 |
|
381 |
// If both a key and secret key are passed in, use those.
|
382 |
if ($key && $secret_key)
|
416 |
// Use 'em if we've got 'em
|
417 |
if ($key && $secret_key && $token)
|
418 |
{
|
419 |
+
$this->key = $key;
|
420 |
+
$this->secret_key = $secret_key;
|
421 |
$this->auth_token = $token;
|
422 |
return true;
|
423 |
}
|
460 |
$this->auth_token = $session_credentials['SessionToken'];
|
461 |
|
462 |
// If both a key and secret key are passed in, use those.
|
463 |
+
if (isset($session_credentials['AccessKeyId']) && isset($session_credentials['SecretAccessKey']))
|
464 |
{
|
465 |
$this->key = $session_credentials['AccessKeyId'];
|
466 |
$this->secret_key = $session_credentials['SecretAccessKey'];
|
467 |
return true;
|
468 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
469 |
// Otherwise set the values to blank and return false.
|
470 |
else
|
471 |
{
|
474 |
}
|
475 |
}
|
476 |
|
477 |
+
/**
|
478 |
+
* The callback function that is executed while caching the session credentials.
|
479 |
+
*
|
480 |
+
* @param string $key (Optional) Your AWS key, or a session key. If blank, it will look for the <code>AWS_KEY</code> constant.
|
481 |
+
* @param string $secret_key (Optional) Your AWS secret key, or a session secret key. If blank, it will look for the <code>AWS_SECRET_KEY</code> constant.
|
482 |
+
* @return mixed The data to be cached or null.
|
483 |
+
*/
|
484 |
public function cache_token($key, $secret_key)
|
485 |
{
|
486 |
$token = new AmazonSTS($key, $secret_key);
|
1366 |
case 'deflate':
|
1367 |
if (strpos($headers['_info']['url'], 'monitoring.') !== false)
|
1368 |
{
|
1369 |
+
// CloudWatchWatch incorrectly does nothing when they say deflate.
|
1370 |
continue;
|
1371 |
}
|
1372 |
else
|
1574 |
{
|
1575 |
require_once($path);
|
1576 |
}
|
1577 |
+
|
1578 |
+
return true;
|
1579 |
}
|
1580 |
}
|
1581 |
|
libs/aws/services/as.class.php
CHANGED
@@ -38,7 +38,7 @@
|
|
38 |
* href="http://docs.amazonwebservices.com/general/latest/gr/index.html?rande.html">Regions and Endpoints</a> in the Amazon Web Services
|
39 |
* General Reference.
|
40 |
*
|
41 |
-
* @version
|
42 |
* @license See the included NOTICE.md file for complete information.
|
43 |
* @copyright See the included NOTICE.md file for complete information.
|
44 |
* @link http://aws.amazon.com/autoscaling/Amazon Auto-Scaling
|
38 |
* href="http://docs.amazonwebservices.com/general/latest/gr/index.html?rande.html">Regions and Endpoints</a> in the Amazon Web Services
|
39 |
* General Reference.
|
40 |
*
|
41 |
+
* @version Thu Sep 01 21:17:05 PDT 2011
|
42 |
* @license See the included NOTICE.md file for complete information.
|
43 |
* @copyright See the included NOTICE.md file for complete information.
|
44 |
* @link http://aws.amazon.com/autoscaling/Amazon Auto-Scaling
|
libs/aws/services/cloudformation.class.php
CHANGED
@@ -48,7 +48,7 @@
|
|
48 |
* Amazon CloudFormation makes use of other AWS products. If you need additional technical information about a specific AWS product, you can
|
49 |
* find the product's technical documentation at <a href="http://aws.amazon.com/documentation/">http://aws.amazon.com/documentation/</a>.
|
50 |
*
|
51 |
-
* @version
|
52 |
* @license See the included NOTICE.md file for complete information.
|
53 |
* @copyright See the included NOTICE.md file for complete information.
|
54 |
* @link http://aws.amazon.com/cloudformation/Amazon CloudFormation
|
@@ -183,7 +183,7 @@ class AmazonCloudFormation extends CFRuntime
|
|
183 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
184 |
* <li><code>TemplateBody</code> - <code>string</code> - Optional - Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Condition: You must pass <code>TemplateBody</code> or <code>TemplateURL</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
|
185 |
* <li><code>TemplateURL</code> - <code>string</code> - Optional - Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
|
186 |
-
* <li><code>Parameters</code> - <code>array</code> - Optional - A list of <code>Parameter</code> structures. <ul>
|
187 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
188 |
* <li><code>ParameterKey</code> - <code>string</code> - Optional - The key associated with the parameter. </li>
|
189 |
* <li><code>ParameterValue</code> - <code>string</code> - Optional - The value associated with the parameter. </li>
|
@@ -192,6 +192,7 @@ class AmazonCloudFormation extends CFRuntime
|
|
192 |
* <li><code>DisableRollback</code> - <code>boolean</code> - Optional - Boolean to enable or disable rollback on stack creation failures.<br></br> Default: <code>false</code> </li>
|
193 |
* <li><code>TimeoutInMinutes</code> - <code>integer</code> - Optional - The amount of time that can pass before the stack status becomes CREATE_FAILED; if <code>DisableRollback</code> is not set or is set to <code>false</code>, the stack will be rolled back. </li>
|
194 |
* <li><code>NotificationARNs</code> - <code>string|array</code> - Optional - The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI). Pass a string for a single value, or an indexed array for multiple values. </li>
|
|
|
195 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
196 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
197 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
@@ -219,6 +220,15 @@ class AmazonCloudFormation extends CFRuntime
|
|
219 |
unset($opt['NotificationARNs']);
|
220 |
}
|
221 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
222 |
return $this->authenticate('CreateStack', $opt, $this->hostname);
|
223 |
}
|
224 |
|
@@ -394,6 +404,51 @@ class AmazonCloudFormation extends CFRuntime
|
|
394 |
|
395 |
return $this->authenticate('DescribeStackResources', $opt, $this->hostname);
|
396 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
397 |
}
|
398 |
|
399 |
|
48 |
* Amazon CloudFormation makes use of other AWS products. If you need additional technical information about a specific AWS product, you can
|
49 |
* find the product's technical documentation at <a href="http://aws.amazon.com/documentation/">http://aws.amazon.com/documentation/</a>.
|
50 |
*
|
51 |
+
* @version Fri Sep 30 16:15:37 PDT 2011
|
52 |
* @license See the included NOTICE.md file for complete information.
|
53 |
* @copyright See the included NOTICE.md file for complete information.
|
54 |
* @link http://aws.amazon.com/cloudformation/Amazon CloudFormation
|
183 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
184 |
* <li><code>TemplateBody</code> - <code>string</code> - Optional - Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Condition: You must pass <code>TemplateBody</code> or <code>TemplateURL</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
|
185 |
* <li><code>TemplateURL</code> - <code>string</code> - Optional - Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
|
186 |
+
* <li><code>Parameters</code> - <code>array</code> - Optional - A list of <code>Parameter</code> structures that specify input parameters for the stack. <ul>
|
187 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
188 |
* <li><code>ParameterKey</code> - <code>string</code> - Optional - The key associated with the parameter. </li>
|
189 |
* <li><code>ParameterValue</code> - <code>string</code> - Optional - The value associated with the parameter. </li>
|
192 |
* <li><code>DisableRollback</code> - <code>boolean</code> - Optional - Boolean to enable or disable rollback on stack creation failures.<br></br> Default: <code>false</code> </li>
|
193 |
* <li><code>TimeoutInMinutes</code> - <code>integer</code> - Optional - The amount of time that can pass before the stack status becomes CREATE_FAILED; if <code>DisableRollback</code> is not set or is set to <code>false</code>, the stack will be rolled back. </li>
|
194 |
* <li><code>NotificationARNs</code> - <code>string|array</code> - Optional - The Simple Notification Service (SNS) topic ARNs to publish stack related events. You can find your SNS topic ARNs using the SNS console or your Command Line Interface (CLI). Pass a string for a single value, or an indexed array for multiple values. </li>
|
195 |
+
* <li><code>Capabilities</code> - <code>array</code>- Optional - The list of capabilities that you want to allow in the stack. If your template contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.</li>
|
196 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
197 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
198 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
220 |
unset($opt['NotificationARNs']);
|
221 |
}
|
222 |
|
223 |
+
// Optional parameter
|
224 |
+
if (isset($opt['Capabilities']))
|
225 |
+
{
|
226 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
227 |
+
'Capabilities' => $opt['Capabilities']
|
228 |
+
), 'member'));
|
229 |
+
unset($opt['Capabilities']);
|
230 |
+
}
|
231 |
+
|
232 |
return $this->authenticate('CreateStack', $opt, $this->hostname);
|
233 |
}
|
234 |
|
404 |
|
405 |
return $this->authenticate('DescribeStackResources', $opt, $this->hostname);
|
406 |
}
|
407 |
+
|
408 |
+
/**
|
409 |
+
* Updates a stack as specified in the template. After the call completes successfully, the stack update starts. You can check the status of
|
410 |
+
* the stack via the DescribeStacks action.
|
411 |
+
*
|
412 |
+
* To get a copy of the template for an existing stack, you can use the GetTemplate action.
|
413 |
+
*
|
414 |
+
* For more information about creating an update template, updating a stack, and monitoring the progress of the update, see <a
|
415 |
+
* href="http://docs.amazonwebservices.com/AWSCloudFormation/latest/UserGuide/using-cfn-updating-stacks.html">Updating a Stack</a>.
|
416 |
+
*
|
417 |
+
* @param string $stack_name (Required) The name or stack ID of the stack to update. Must contain only alphanumeric characters (case sensitive) and start with an alpha character. Maximum length of the name is 255 characters.
|
418 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
419 |
+
* <li><code>TemplateBody</code> - <code>string</code> - Optional - Structure containing the template body. (For more information, go to the AWS CloudFormation User Guide.) Condition: You must pass <code>TemplateBody</code> or <code>TemplateURL</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
|
420 |
+
* <li><code>TemplateURL</code> - <code>string</code> - Optional - Location of file containing the template body. The URL must point to a template located in an S3 bucket in the same region as the stack. For more information, go to the AWS CloudFormation User Guide. Conditional: You must pass <code>TemplateURL</code> or <code>TemplateBody</code>. If both are passed, only <code>TemplateBody</code> is used. </li>
|
421 |
+
* <li><code>Parameters</code> - <code>array</code> - Optional - A list of <code>Parameter</code> structures that specify input parameters for the stack.</li>
|
422 |
+
* <li><code>Capabilities</code> - <code>array</code>- Optional - The list of capabilities that you want to allow in the stack. If your stack contains IAM resources, you must specify the CAPABILITY_IAM value for this parameter; otherwise, this action returns an InsufficientCapabilities error. IAM resources are the following: AWS::IAM::AccessKey, AWS::IAM::Group, AWS::IAM::Policy, AWS::IAM::User, and AWS::IAM::UserToGroupAddition.</li>
|
423 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
424 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
425 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
426 |
+
*/
|
427 |
+
public function update_stack($stack_name, $opt = null)
|
428 |
+
{
|
429 |
+
if (!$opt) $opt = array();
|
430 |
+
$opt['StackName'] = $stack_name;
|
431 |
+
|
432 |
+
// Optional parameter
|
433 |
+
if (isset($opt['Parameters']))
|
434 |
+
{
|
435 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
436 |
+
'Parameters' => $opt['Parameters']
|
437 |
+
), 'member'));
|
438 |
+
unset($opt['Parameters']);
|
439 |
+
}
|
440 |
+
|
441 |
+
// Optional parameter
|
442 |
+
if (isset($opt['Capabilities']))
|
443 |
+
{
|
444 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
445 |
+
'Capabilities' => $opt['Capabilities']
|
446 |
+
), 'member'));
|
447 |
+
unset($opt['Capabilities']);
|
448 |
+
}
|
449 |
+
|
450 |
+
return $this->authenticate('UpdateStack', $opt, $this->hostname);
|
451 |
+
}
|
452 |
}
|
453 |
|
454 |
|
libs/aws/services/cloudwatch.class.php
CHANGED
@@ -47,7 +47,7 @@
|
|
47 |
*
|
48 |
* </ul>
|
49 |
*
|
50 |
-
* @version
|
51 |
* @license See the included NOTICE.md file for complete information.
|
52 |
* @copyright See the included NOTICE.md file for complete information.
|
53 |
* @link http://aws.amazon.com/cloudwatch/Amazon CloudWatch
|
47 |
*
|
48 |
* </ul>
|
49 |
*
|
50 |
+
* @version Thu Sep 01 21:18:18 PDT 2011
|
51 |
* @license See the included NOTICE.md file for complete information.
|
52 |
* @copyright See the included NOTICE.md file for complete information.
|
53 |
* @link http://aws.amazon.com/cloudwatch/Amazon CloudWatch
|
libs/aws/services/ec2.class.php
CHANGED
@@ -27,7 +27,7 @@
|
|
27 |
*
|
28 |
* Visit <a href="http://aws.amazon.com/ec2/">http://aws.amazon.com/ec2/</a> for more information.
|
29 |
*
|
30 |
-
* @version
|
31 |
* @license See the included NOTICE.md file for complete information.
|
32 |
* @copyright See the included NOTICE.md file for complete information.
|
33 |
* @link http://aws.amazon.com/ec2/Amazon Elastic Compute Cloud
|
@@ -131,7 +131,7 @@ class AmazonEC2 extends CFRuntime
|
|
131 |
*/
|
132 |
public function __construct($key = null, $secret_key = null, $token = null)
|
133 |
{
|
134 |
-
$this->api_version = '2011-
|
135 |
$this->hostname = self::DEFAULT_URL;
|
136 |
|
137 |
if (!$key && !defined('AWS_KEY'))
|
27 |
*
|
28 |
* Visit <a href="http://aws.amazon.com/ec2/">http://aws.amazon.com/ec2/</a> for more information.
|
29 |
*
|
30 |
+
* @version Tue Aug 23 12:47:35 PDT 2011
|
31 |
* @license See the included NOTICE.md file for complete information.
|
32 |
* @copyright See the included NOTICE.md file for complete information.
|
33 |
* @link http://aws.amazon.com/ec2/Amazon Elastic Compute Cloud
|
131 |
*/
|
132 |
public function __construct($key = null, $secret_key = null, $token = null)
|
133 |
{
|
134 |
+
$this->api_version = '2011-07-15';
|
135 |
$this->hostname = self::DEFAULT_URL;
|
136 |
|
137 |
if (!$key && !defined('AWS_KEY'))
|
libs/aws/services/elasticache.class.php
ADDED
@@ -0,0 +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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
6 |
+
* You may not use this file except in compliance with the License.
|
7 |
+
* A copy of the License is located at
|
8 |
+
*
|
9 |
+
* http://aws.amazon.com/apache2.0
|
10 |
+
*
|
11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
13 |
+
* express or implied. See the License for the specific language governing
|
14 |
+
* permissions and limitations under the License.
|
15 |
+
*/
|
16 |
+
|
17 |
+
/**
|
18 |
+
*
|
19 |
+
*
|
20 |
+
* Amazon ElastiCache is a web service that makes it easier to set up, operate, and scale a distributed cache in the cloud.
|
21 |
+
*
|
22 |
+
* With Amazon ElastiCache, customers gain all of the benefits of a high-performance, in-memory cache with far less of the administrative
|
23 |
+
* burden of launching and managing a distributed cache. The service makes set-up, scaling, and cluster failure handling much simpler than in a
|
24 |
+
* self-managed cache deployment.
|
25 |
+
*
|
26 |
+
* In addition, through integration with Amazon CloudWatch, customers get enhanced visibility into the key performance statistics associated
|
27 |
+
* with their cache and can receive alarms if a part of their cache runs hot.
|
28 |
+
*
|
29 |
+
* @version Thu Sep 01 21:18:49 PDT 2011
|
30 |
+
* @license See the included NOTICE.md file for complete information.
|
31 |
+
* @copyright See the included NOTICE.md file for complete information.
|
32 |
+
* @link http://aws.amazon.com/elasticache/AWS ElastiCache
|
33 |
+
* @link http://aws.amazon.com/documentation/elasticache/AWS ElastiCache documentation
|
34 |
+
*/
|
35 |
+
class AmazonElastiCache extends CFRuntime
|
36 |
+
{
|
37 |
+
|
38 |
+
/*%******************************************************************************************%*/
|
39 |
+
// CLASS CONSTANTS
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Specify the default queue URL.
|
43 |
+
*/
|
44 |
+
const DEFAULT_URL = 'elasticache.us-east-1.amazonaws.com';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Specify the queue URL for the US-East (Northern Virginia) Region.
|
48 |
+
*/
|
49 |
+
const REGION_US_E1 = 'us-east-1';
|
50 |
+
|
51 |
+
|
52 |
+
/*%******************************************************************************************%*/
|
53 |
+
// SETTERS
|
54 |
+
|
55 |
+
/**
|
56 |
+
* This allows you to explicitly sets the region for the service to use.
|
57 |
+
*
|
58 |
+
* @param string $region (Required) The region to explicitly set. Available options are <REGION_US_E1>.
|
59 |
+
* @return $this A reference to the current instance.
|
60 |
+
*/
|
61 |
+
public function set_region($region)
|
62 |
+
{
|
63 |
+
$this->set_hostname('http://elasticache.'. $region .'.amazonaws.com');
|
64 |
+
return $this;
|
65 |
+
}
|
66 |
+
|
67 |
+
|
68 |
+
/*%******************************************************************************************%*/
|
69 |
+
// CONSTRUCTOR
|
70 |
+
|
71 |
+
/**
|
72 |
+
* Constructs a new instance of <AmazonElastiCache>.
|
73 |
+
*
|
74 |
+
* @param string $key (Optional) Your Amazon API Key. If blank, it will look for the <code>AWS_KEY</code> constant.
|
75 |
+
* @param string $secret_key (Optional) Your Amazon API Secret Key. If blank, it will look for the <code>AWS_SECRET_KEY</code> constant.
|
76 |
+
* @return boolean false if no valid values are set, otherwise true.
|
77 |
+
*/
|
78 |
+
public function __construct($key = null, $secret_key = null)
|
79 |
+
{
|
80 |
+
$this->api_version = '2011-07-15';
|
81 |
+
$this->hostname = self::DEFAULT_URL;
|
82 |
+
|
83 |
+
if (!$key && !defined('AWS_KEY'))
|
84 |
+
{
|
85 |
+
// @codeCoverageIgnoreStart
|
86 |
+
throw new ElastiCache_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
|
87 |
+
// @codeCoverageIgnoreEnd
|
88 |
+
}
|
89 |
+
|
90 |
+
if (!$secret_key && !defined('AWS_SECRET_KEY'))
|
91 |
+
{
|
92 |
+
// @codeCoverageIgnoreStart
|
93 |
+
throw new ElastiCache_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
|
94 |
+
// @codeCoverageIgnoreEnd
|
95 |
+
}
|
96 |
+
|
97 |
+
return parent::__construct($key, $secret_key);
|
98 |
+
}
|
99 |
+
|
100 |
+
|
101 |
+
/*%******************************************************************************************%*/
|
102 |
+
// SERVICE METHODS
|
103 |
+
|
104 |
+
/**
|
105 |
+
*
|
106 |
+
* This API returns the default engine and system parameter information for the specified cache engine.
|
107 |
+
*
|
108 |
+
* @param string $cache_parameter_group_family (Required) The name of the Cache Parameter Group Family. Currently, <i>memcached1.4</i> is the only cache parameter group family supported by the service.
|
109 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
110 |
+
* <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. </li>
|
111 |
+
* <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li>
|
112 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
113 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
114 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
115 |
+
*/
|
116 |
+
public function describe_engine_default_parameters($cache_parameter_group_family, $opt = null)
|
117 |
+
{
|
118 |
+
if (!$opt) $opt = array();
|
119 |
+
$opt['CacheParameterGroupFamily'] = $cache_parameter_group_family;
|
120 |
+
|
121 |
+
return $this->authenticate('DescribeEngineDefaultParameters', $opt, $this->hostname);
|
122 |
+
}
|
123 |
+
|
124 |
+
/**
|
125 |
+
*
|
126 |
+
* This API modifies the parameters of a CacheParameterGroup. To modify more than one parameter submit a list of the following: ParameterName
|
127 |
+
* and ParameterValue. A maximum of 20 parameters can be modified in a single request.
|
128 |
+
*
|
129 |
+
* @param string $cache_parameter_group_name (Required) The name of the cache parameter group to modify.
|
130 |
+
* @param array $parameter_name_values (Required) An array of parameter names and values for the parameter update. At least one parameter name and value must be supplied; subsequent arguments are optional. A maximum of 20 parameters may be modified in a single request. <ul>
|
131 |
+
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
132 |
+
* <li><code>ParameterName</code> - <code>string</code> - Optional - Specifies the name of the parameter. </li>
|
133 |
+
* <li><code>ParameterValue</code> - <code>string</code> - Optional - Specifies the value of the parameter. </li>
|
134 |
+
* </ul></li>
|
135 |
+
* </ul>
|
136 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
137 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
138 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
139 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
140 |
+
*/
|
141 |
+
public function modify_cache_parameter_group($cache_parameter_group_name, $parameter_name_values, $opt = null)
|
142 |
+
{
|
143 |
+
if (!$opt) $opt = array();
|
144 |
+
$opt['CacheParameterGroupName'] = $cache_parameter_group_name;
|
145 |
+
|
146 |
+
// Required parameter
|
147 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
148 |
+
'ParameterNameValues' => (is_array($parameter_name_values) ? $parameter_name_values : array($parameter_name_values))
|
149 |
+
), 'member'));
|
150 |
+
|
151 |
+
return $this->authenticate('ModifyCacheParameterGroup', $opt, $this->hostname);
|
152 |
+
}
|
153 |
+
|
154 |
+
/**
|
155 |
+
*
|
156 |
+
* Creates a new Cache Cluster.
|
157 |
+
*
|
158 |
+
* @param string $cache_cluster_id (Required) The Cache Cluster identifier. This parameter is stored as a lowercase string. Constraints: <ul> <li>Must contain from 1 to 20 alphanumeric characters or hyphens.</li><li>First character must be a letter.</li><li>Cannot end with a hyphen or contain two consecutive hyphens.</li> </ul> Example: <code>mycachecluster</code>
|
159 |
+
* @param integer $num_cache_nodes (Required) The number of Cache Nodes the Cache Cluster should have.
|
160 |
+
* @param string $cache_node_type (Required) The compute and memory capacity of nodes in a Cache Cluster. Valid values: <code>cache.m1.large | cache.m1.xlarge | cache.m2.xlarge | cache.m2.2xlarge | cache.m2.4xlarge | cache.c1.xlarge </code>
|
161 |
+
* @param string $engine (Required) The name of the cache engine to be used for this Cache Cluster. Currently, <i>memcached</i> is the only cache engine supported by the service.
|
162 |
+
* @param string|array $cache_security_group_names (Required) A list of Cache Security Group Names to associate with this Cache Cluster. Pass a string for a single value, or an indexed array for multiple values.
|
163 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
164 |
+
* <li><code>EngineVersion</code> - <code>string</code> - Optional - The version of the cache engine to be used for this cluster. </li>
|
165 |
+
* <li><code>CacheParameterGroupName</code> - <code>string</code> - Optional - The name of the cache parameter group to associate with this Cache cluster. If this argument is omitted, the default CacheParameterGroup for the specified engine will be used. </li>
|
166 |
+
* <li><code>PreferredAvailabilityZone</code> - <code>string</code> - Optional - The EC2 Availability Zone that the Cache Cluster will be created in. In normal use, all CacheNodes belonging to a CacheCluster are placed in the preferred availability zone. In rare circumstances, some of the CacheNodes might temporarily be in a different availability zone. Default: System chosen (random) availability zone. </li>
|
167 |
+
* <li><code>PreferredMaintenanceWindow</code> - <code>string</code> - Optional - The weekly time range (in UTC) during which system maintenance can occur. Example: <code>sun:05:00-sun:09:00</code> </li>
|
168 |
+
* <li><code>Port</code> - <code>integer</code> - Optional - The port number on which each of the Cache Nodes will accept connections. </li>
|
169 |
+
* <li><code>NotificationTopicArn</code> - <code>string</code> - Optional - The Amazon Resource Name (ARN) of the SNS topic to which notifications will be sent. The SNS topic owner must be same as the Cache Cluster owner. </li>
|
170 |
+
* <li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor engine upgrades will be applied automatically to the Cache Cluster during the maintenance window. Default: <code>true</code> </li>
|
171 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
172 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
173 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
174 |
+
*/
|
175 |
+
public function create_cache_cluster($cache_cluster_id, $num_cache_nodes, $cache_node_type, $engine, $cache_security_group_names, $opt = null)
|
176 |
+
{
|
177 |
+
if (!$opt) $opt = array();
|
178 |
+
$opt['CacheClusterId'] = $cache_cluster_id;
|
179 |
+
$opt['NumCacheNodes'] = $num_cache_nodes;
|
180 |
+
$opt['CacheNodeType'] = $cache_node_type;
|
181 |
+
$opt['Engine'] = $engine;
|
182 |
+
|
183 |
+
// Required parameter
|
184 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
185 |
+
'CacheSecurityGroupNames' => (is_array($cache_security_group_names) ? $cache_security_group_names : array($cache_security_group_names))
|
186 |
+
), 'member'));
|
187 |
+
|
188 |
+
return $this->authenticate('CreateCacheCluster', $opt, $this->hostname);
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
*
|
193 |
+
* Authorizes ingress to a CacheSecurityGroup using EC2 Security Groups as authorization (therefore the application using the cache must be
|
194 |
+
* running on EC2 clusters). This API requires the following parameters: EC2SecurityGroupName and EC2SecurityGroupOwnerId.
|
195 |
+
*
|
196 |
+
* You cannot authorize ingress from an EC2 security group in one Region to an Amazon Cache Cluster in another.
|
197 |
+
*
|
198 |
+
* @param string $cache_security_group_name (Required) The name of the Cache Security Group to authorize.
|
199 |
+
* @param string $ec2_security_group_name (Required) Name of the EC2 Security Group to include in the authorization.
|
200 |
+
* @param string $ec2_security_group_owner_id (Required) AWS Account Number of the owner of the security group specified in the EC2SecurityGroupName parameter. The AWS Access Key ID is not an acceptable value.
|
201 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
202 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
203 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
204 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
205 |
+
*/
|
206 |
+
public function authorize_cache_security_group_ingress($cache_security_group_name, $ec2_security_group_name, $ec2_security_group_owner_id, $opt = null)
|
207 |
+
{
|
208 |
+
if (!$opt) $opt = array();
|
209 |
+
$opt['CacheSecurityGroupName'] = $cache_security_group_name;
|
210 |
+
$opt['EC2SecurityGroupName'] = $ec2_security_group_name;
|
211 |
+
$opt['EC2SecurityGroupOwnerId'] = $ec2_security_group_owner_id;
|
212 |
+
|
213 |
+
return $this->authenticate('AuthorizeCacheSecurityGroupIngress', $opt, $this->hostname);
|
214 |
+
}
|
215 |
+
|
216 |
+
/**
|
217 |
+
*
|
218 |
+
* Creates a new Cache Security Group. Cache Security groups control access to one or more Cache Clusters.
|
219 |
+
*
|
220 |
+
* @param string $cache_security_group_name (Required) The name for the Cache Security Group. This value is stored as a lowercase string. Constraints: Must contain no more than 255 alphanumeric characters. Must not be "Default". Example: <code>mysecuritygroup</code>
|
221 |
+
* @param string $description (Required) The description for the Cache Security Group.
|
222 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
223 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
224 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
225 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
226 |
+
*/
|
227 |
+
public function create_cache_security_group($cache_security_group_name, $description, $opt = null)
|
228 |
+
{
|
229 |
+
if (!$opt) $opt = array();
|
230 |
+
$opt['CacheSecurityGroupName'] = $cache_security_group_name;
|
231 |
+
$opt['Description'] = $description;
|
232 |
+
|
233 |
+
return $this->authenticate('CreateCacheSecurityGroup', $opt, $this->hostname);
|
234 |
+
}
|
235 |
+
|
236 |
+
/**
|
237 |
+
*
|
238 |
+
* Deletes a previously provisioned Cache Cluster. A successful response from the web service indicates the request was received correctly.
|
239 |
+
* This action cannot be canceled or reverted. DeleteCacheCluster deletes all associated Cache Nodes, node endpoints and the Cache Cluster
|
240 |
+
* itself.
|
241 |
+
*
|
242 |
+
* @param string $cache_cluster_id (Required) The Cache Cluster identifier for the Cache Cluster to be deleted. This parameter isn't case sensitive.
|
243 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
244 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
245 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
246 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
247 |
+
*/
|
248 |
+
public function delete_cache_cluster($cache_cluster_id, $opt = null)
|
249 |
+
{
|
250 |
+
if (!$opt) $opt = array();
|
251 |
+
$opt['CacheClusterId'] = $cache_cluster_id;
|
252 |
+
|
253 |
+
return $this->authenticate('DeleteCacheCluster', $opt, $this->hostname);
|
254 |
+
}
|
255 |
+
|
256 |
+
/**
|
257 |
+
*
|
258 |
+
* Returns a list of CacheSecurityGroup descriptions. If a CacheSecurityGroupName is specified, the list will contain only the description of
|
259 |
+
* the specified CacheSecurityGroup.
|
260 |
+
*
|
261 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
262 |
+
* <li><code>CacheSecurityGroupName</code> - <code>string</code> - Optional - The name of the Cache Security Group to return details for. </li>
|
263 |
+
* <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100 </li>
|
264 |
+
* <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li>
|
265 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
266 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
267 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
268 |
+
*/
|
269 |
+
public function describe_cache_security_groups($opt = null)
|
270 |
+
{
|
271 |
+
if (!$opt) $opt = array();
|
272 |
+
|
273 |
+
return $this->authenticate('DescribeCacheSecurityGroups', $opt, $this->hostname);
|
274 |
+
}
|
275 |
+
|
276 |
+
/**
|
277 |
+
*
|
278 |
+
* This API returns a list of CacheParameterGroup descriptions. If a CacheParameterGroupName is specified, the list will contain only the
|
279 |
+
* descriptions of the specified CacheParameterGroup.
|
280 |
+
*
|
281 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
282 |
+
* <li><code>CacheParameterGroupName</code> - <code>string</code> - Optional - The name of a specific cache parameter group to return details for. </li>
|
283 |
+
* <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. </li>
|
284 |
+
* <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheParameterGroups request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li>
|
285 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
286 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
287 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
288 |
+
*/
|
289 |
+
public function describe_cache_parameter_groups($opt = null)
|
290 |
+
{
|
291 |
+
if (!$opt) $opt = array();
|
292 |
+
|
293 |
+
return $this->authenticate('DescribeCacheParameterGroups', $opt, $this->hostname);
|
294 |
+
}
|
295 |
+
|
296 |
+
/**
|
297 |
+
*
|
298 |
+
* Returns the detailed parameter list for a particular CacheParameterGroup.
|
299 |
+
*
|
300 |
+
* @param string $cache_parameter_group_name (Required) The name of a specific cache parameter group to return details for.
|
301 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
302 |
+
* <li><code>Source</code> - <code>string</code> - Optional - The parameter types to return. Valid values: <code>user</code> | <code>system</code> | <code>engine-default</code> </li>
|
303 |
+
* <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. </li>
|
304 |
+
* <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li>
|
305 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
306 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
307 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
308 |
+
*/
|
309 |
+
public function describe_cache_parameters($cache_parameter_group_name, $opt = null)
|
310 |
+
{
|
311 |
+
if (!$opt) $opt = array();
|
312 |
+
$opt['CacheParameterGroupName'] = $cache_parameter_group_name;
|
313 |
+
|
314 |
+
return $this->authenticate('DescribeCacheParameters', $opt, $this->hostname);
|
315 |
+
}
|
316 |
+
|
317 |
+
/**
|
318 |
+
*
|
319 |
+
* This API returns events related to Cache Clusters, Cache Security Groups, and Cache Parameter Groups for the past 14 days. Events specific
|
320 |
+
* to a particular Cache Cluster, cache security group, or cache parameter group can be obtained by providing the name as a parameter. By
|
321 |
+
* default, the past hour of events are returned.
|
322 |
+
*
|
323 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
324 |
+
* <li><code>SourceIdentifier</code> - <code>string</code> - Optional - The identifier of the event source for which events will be returned. If not specified, then all sources are included in the response. </li>
|
325 |
+
* <li><code>SourceType</code> - <code>string</code> - Optional - The event source to retrieve events for. If no value is specified, all events are returned. [Allowed values: <code>cache-cluster</code>, <code>cache-parameter-group</code>, <code>cache-security-group</code>]</li>
|
326 |
+
* <li><code>StartTime</code> - <code>string</code> - Optional - The beginning of the time interval to retrieve events for, specified in ISO 8601 format. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
|
327 |
+
* <li><code>EndTime</code> - <code>string</code> - Optional - The end of the time interval for which to retrieve events, specified in ISO 8601 format. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
|
328 |
+
* <li><code>Duration</code> - <code>integer</code> - Optional - The number of minutes to retrieve events for. </li>
|
329 |
+
* <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. </li>
|
330 |
+
* <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li>
|
331 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
332 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
333 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
334 |
+
*/
|
335 |
+
public function describe_events($opt = null)
|
336 |
+
{
|
337 |
+
if (!$opt) $opt = array();
|
338 |
+
|
339 |
+
// Optional parameter
|
340 |
+
if (isset($opt['StartTime']))
|
341 |
+
{
|
342 |
+
$opt['StartTime'] = $this->util->convert_date_to_iso8601($opt['StartTime']);
|
343 |
+
}
|
344 |
+
|
345 |
+
// Optional parameter
|
346 |
+
if (isset($opt['EndTime']))
|
347 |
+
{
|
348 |
+
$opt['EndTime'] = $this->util->convert_date_to_iso8601($opt['EndTime']);
|
349 |
+
}
|
350 |
+
|
351 |
+
return $this->authenticate('DescribeEvents', $opt, $this->hostname);
|
352 |
+
}
|
353 |
+
|
354 |
+
/**
|
355 |
+
*
|
356 |
+
* Modifies Cache Cluster settings. You can change one or more Cache Cluster configuration parameters by specifying the parameters and the new
|
357 |
+
* values in the request.
|
358 |
+
*
|
359 |
+
* @param string $cache_cluster_id (Required) The Cache Cluster identifier. This value is stored as a lowercase string.
|
360 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
361 |
+
* <li><code>NumCacheNodes</code> - <code>integer</code> - Optional - The number of Cache Nodes the Cache Cluster should have. If NumCacheNodes is greater than the existing number of Cache Nodes, Cache Nodes will be added. If NumCacheNodes is less than the existing number of Cache Nodes, Cache Nodes will be removed. When removing Cache Nodes, the Ids of the specific Cache Nodes to be removed must be supplied using the CacheNodeIdsToRemove parameter. </li>
|
362 |
+
* <li><code>CacheNodeIdsToRemove</code> - <code>string|array</code> - Optional - The list of Cache Node IDs to be removed. This parameter is only valid when NumCacheNodes is less than the existing number of Cache Nodes. The number of Cache Node Ids supplied in this parameter must match the difference between the existing number of Cache Nodes in the cluster and the new NumCacheNodes requested. Pass a string for a single value, or an indexed array for multiple values. </li>
|
363 |
+
* <li><code>CacheSecurityGroupNames</code> - <code>string|array</code> - Optional - A list of Cache Security Group Names to authorize on this Cache Cluster. This change is asynchronously applied as soon as possible. Constraints: Must contain no more than 255 alphanumeric characters. Must not be "Default". Pass a string for a single value, or an indexed array for multiple values. </li>
|
364 |
+
* <li><code>PreferredMaintenanceWindow</code> - <code>string</code> - Optional - The weekly time range (in UTC) during which system maintenance can occur, which may result in an outage. This change is made immediately. If moving this window to the current time, there must be at least 120 minutes between the current time and end of the window to ensure pending changes are applied. </li>
|
365 |
+
* <li><code>NotificationTopicArn</code> - <code>string</code> - Optional - The Amazon resource name(ARN) of the SNS topic to which notifications will be sent. The SNS topic owner must be same as the Cache Cluster owner. </li>
|
366 |
+
* <li><code>CacheParameterGroupName</code> - <code>string</code> - Optional - The name of the Cache Parameter Group to apply to this Cache Cluster. This change is asynchronously applied as soon as possible for parameters when the <i>ApplyImmediately</i> parameter is specified as <i>true</i> for this request. </li>
|
367 |
+
* <li><code>NotificationTopicStatus</code> - <code>string</code> - Optional - The status of the SNS notification topic. The value can be <i>active</i> or <i>inactive</i>. Notifications are sent only if the status is <i>active</i>. </li>
|
368 |
+
* <li><code>ApplyImmediately</code> - <code>boolean</code> - Optional - Specifies whether or not the modifications in this request and any pending modifications are asynchronously applied as soon as possible, regardless of the <i>PreferredMaintenanceWindow</i> setting for the Cache Cluster. If this parameter is passed as <i>false</i>, changes to the Cache Cluster are applied on the next maintenance reboot, or the next failure reboot, whichever occurs first. The default value for this parameter is <i>false</i>. </li>
|
369 |
+
* <li><code>EngineVersion</code> - <code>string</code> - Optional - The version of the cache engine to upgrade this cluster to. </li>
|
370 |
+
* <li><code>AutoMinorVersionUpgrade</code> - <code>boolean</code> - Optional - Indicates that minor engine upgrades will be applied automatically to the Cache Cluster during the maintenance window. Default: <code>true</code> </li>
|
371 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
372 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
373 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
374 |
+
*/
|
375 |
+
public function modify_cache_cluster($cache_cluster_id, $opt = null)
|
376 |
+
{
|
377 |
+
if (!$opt) $opt = array();
|
378 |
+
$opt['CacheClusterId'] = $cache_cluster_id;
|
379 |
+
|
380 |
+
// Optional parameter
|
381 |
+
if (isset($opt['CacheNodeIdsToRemove']))
|
382 |
+
{
|
383 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
384 |
+
'CacheNodeIdsToRemove' => (is_array($opt['CacheNodeIdsToRemove']) ? $opt['CacheNodeIdsToRemove'] : array($opt['CacheNodeIdsToRemove']))
|
385 |
+
), 'member'));
|
386 |
+
unset($opt['CacheNodeIdsToRemove']);
|
387 |
+
}
|
388 |
+
|
389 |
+
// Optional parameter
|
390 |
+
if (isset($opt['CacheSecurityGroupNames']))
|
391 |
+
{
|
392 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
393 |
+
'CacheSecurityGroupNames' => (is_array($opt['CacheSecurityGroupNames']) ? $opt['CacheSecurityGroupNames'] : array($opt['CacheSecurityGroupNames']))
|
394 |
+
), 'member'));
|
395 |
+
unset($opt['CacheSecurityGroupNames']);
|
396 |
+
}
|
397 |
+
|
398 |
+
return $this->authenticate('ModifyCacheCluster', $opt, $this->hostname);
|
399 |
+
}
|
400 |
+
|
401 |
+
/**
|
402 |
+
*
|
403 |
+
* This API modifies the parameters of a CacheParameterGroup to the engine/system default value. To reset specific parameters submit a list of
|
404 |
+
* the parameter names. To reset the entire CacheParameterGroup specify the CacheParameterGroup name and ResetAllParameters parameters.
|
405 |
+
*
|
406 |
+
* @param string $cache_parameter_group_name (Required) The name of the Cache Parameter Group.
|
407 |
+
* @param array $parameter_name_values (Required) An array of parameter names which should be reset. If not resetting the entire CacheParameterGroup, at least one parameter name must be supplied. <ul>
|
408 |
+
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
409 |
+
* <li><code>ParameterName</code> - <code>string</code> - Optional - Specifies the name of the parameter. </li>
|
410 |
+
* <li><code>ParameterValue</code> - <code>string</code> - Optional - Specifies the value of the parameter. </li>
|
411 |
+
* </ul></li>
|
412 |
+
* </ul>
|
413 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
414 |
+
* <li><code>ResetAllParameters</code> - <code>boolean</code> - Optional - Specifies whether (<i>true</i>) or not (<i>false</i>) to reset all parameters in the Cache Parameter Group to default values. </li>
|
415 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
416 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
417 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
418 |
+
*/
|
419 |
+
public function reset_cache_parameter_group($cache_parameter_group_name, $parameter_name_values, $opt = null)
|
420 |
+
{
|
421 |
+
if (!$opt) $opt = array();
|
422 |
+
$opt['CacheParameterGroupName'] = $cache_parameter_group_name;
|
423 |
+
|
424 |
+
// Required parameter
|
425 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
426 |
+
'ParameterNameValues' => (is_array($parameter_name_values) ? $parameter_name_values : array($parameter_name_values))
|
427 |
+
), 'member'));
|
428 |
+
|
429 |
+
return $this->authenticate('ResetCacheParameterGroup', $opt, $this->hostname);
|
430 |
+
}
|
431 |
+
|
432 |
+
/**
|
433 |
+
*
|
434 |
+
* This API deletes a particular CacheParameterGroup. The CacheParameterGroup cannot be deleted if it is associated with any cache clusters.
|
435 |
+
*
|
436 |
+
* @param string $cache_parameter_group_name (Required) The name of the Cache Parameter Group to delete. The specified cache security group must not be associated with any Cache clusters.
|
437 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
438 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
439 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
440 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
441 |
+
*/
|
442 |
+
public function delete_cache_parameter_group($cache_parameter_group_name, $opt = null)
|
443 |
+
{
|
444 |
+
if (!$opt) $opt = array();
|
445 |
+
$opt['CacheParameterGroupName'] = $cache_parameter_group_name;
|
446 |
+
|
447 |
+
return $this->authenticate('DeleteCacheParameterGroup', $opt, $this->hostname);
|
448 |
+
}
|
449 |
+
|
450 |
+
/**
|
451 |
+
*
|
452 |
+
* Returns information about all provisioned Cache Clusters if no Cache Cluster identifier is specified, or about a specific Cache Cluster if
|
453 |
+
* a Cache Cluster identifier is supplied.
|
454 |
+
*
|
455 |
+
* Cluster information will be returned by default. An optional <i>ShowDetails</i> flag can be used to retrieve detailed information about the
|
456 |
+
* Cache Nodes associated with the Cache Cluster. Details include the DNS address and port for the Cache Node endpoint.
|
457 |
+
*
|
458 |
+
* If the cluster is in CREATING state, only cluster level information will be displayed until all of the nodes are successfully provisioned.
|
459 |
+
*
|
460 |
+
* If the cluster is in DELETING state, only cluster level information will be displayed.
|
461 |
+
*
|
462 |
+
* While adding Cache Nodes, node endpoint information and creation time for the additional nodes will not be displayed until they are
|
463 |
+
* completely provisioned. The cluster lifecycle tells the customer when new nodes are AVAILABLE.
|
464 |
+
*
|
465 |
+
* While removing existing Cache Nodes from an cluster, endpoint information for the removed nodes will not be displayed.
|
466 |
+
*
|
467 |
+
* DescribeCacheClusters supports pagination.
|
468 |
+
*
|
469 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
470 |
+
* <li><code>CacheClusterId</code> - <code>string</code> - Optional - The user-supplied cluster identifier. If this parameter is specified, only information about that specific Cache Cluster is returned. This parameter isn't case sensitive. </li>
|
471 |
+
* <li><code>MaxRecords</code> - <code>integer</code> - Optional - The maximum number of records to include in the response. If more records exist than the specified <i>MaxRecords</i> value, a marker is included in the response so that the remaining results may be retrieved. Default: 100 Constraints: minimum 20, maximum 100 </li>
|
472 |
+
* <li><code>Marker</code> - <code>string</code> - Optional - An optional marker provided in the previous DescribeCacheClusters request. If this parameter is specified, the response includes only records beyond the marker, up to the value specified by <i>MaxRecords</i>. </li>
|
473 |
+
* <li><code>ShowCacheNodeInfo</code> - <code>boolean</code> - Optional - An optional flag that can be included in the DescribeCacheCluster request to retrieve Cache Nodes information. </li>
|
474 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
475 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
476 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
477 |
+
*/
|
478 |
+
public function describe_cache_clusters($opt = null)
|
479 |
+
{
|
480 |
+
if (!$opt) $opt = array();
|
481 |
+
|
482 |
+
return $this->authenticate('DescribeCacheClusters', $opt, $this->hostname);
|
483 |
+
}
|
484 |
+
|
485 |
+
/**
|
486 |
+
*
|
487 |
+
* Deletes a Cache Security Group.
|
488 |
+
*
|
489 |
+
* The specified Cache Security Group must not be associated with any Cache Clusters.
|
490 |
+
*
|
491 |
+
* @param string $cache_security_group_name (Required) The name of the Cache Security Group to delete. You cannot delete the default security group.
|
492 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
493 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
494 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
495 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
496 |
+
*/
|
497 |
+
public function delete_cache_security_group($cache_security_group_name, $opt = null)
|
498 |
+
{
|
499 |
+
if (!$opt) $opt = array();
|
500 |
+
$opt['CacheSecurityGroupName'] = $cache_security_group_name;
|
501 |
+
|
502 |
+
return $this->authenticate('DeleteCacheSecurityGroup', $opt, $this->hostname);
|
503 |
+
}
|
504 |
+
|
505 |
+
/**
|
506 |
+
*
|
507 |
+
* Creates a new Cache Parameter Group. Cache Parameter groups control the parameters for a Cache Cluster.
|
508 |
+
*
|
509 |
+
* @param string $cache_parameter_group_name (Required) The name of the Cache Parameter Group.
|
510 |
+
* @param string $cache_parameter_group_family (Required) The name of the Cache Parameter Group Family the Cache Parameter Group can be used with. Currently, <i>memcached1.4</i> is the only cache parameter group family supported by the service.
|
511 |
+
* @param string $description (Required) The description for the Cache Parameter Group.
|
512 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
513 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
514 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
515 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
516 |
+
*/
|
517 |
+
public function create_cache_parameter_group($cache_parameter_group_name, $cache_parameter_group_family, $description, $opt = null)
|
518 |
+
{
|
519 |
+
if (!$opt) $opt = array();
|
520 |
+
$opt['CacheParameterGroupName'] = $cache_parameter_group_name;
|
521 |
+
$opt['CacheParameterGroupFamily'] = $cache_parameter_group_family;
|
522 |
+
$opt['Description'] = $description;
|
523 |
+
|
524 |
+
return $this->authenticate('CreateCacheParameterGroup', $opt, $this->hostname);
|
525 |
+
}
|
526 |
+
|
527 |
+
/**
|
528 |
+
*
|
529 |
+
* The RebootCacheCluster API reboots some (or all) of the cache cluster nodes within a previously provisioned ElastiCache cluster. This API
|
530 |
+
* results in the application of modified CacheParameterGroup parameters to the cache cluster. This action is taken as soon as possible, and
|
531 |
+
* results in a momentary outage to the cache cluster during which the cache cluster status is set to rebooting. During that momentary outage
|
532 |
+
* the contents of the cache (for each cache cluster node being rebooted) are lost. A CacheCluster event is created when the reboot is
|
533 |
+
* completed.
|
534 |
+
*
|
535 |
+
* @param string $cache_cluster_id (Required) The Cache Cluster identifier. This parameter is stored as a lowercase string.
|
536 |
+
* @param string|array $cache_node_ids_to_reboot (Required) A list of Cache Cluster Node ids to reboot. To reboot an entire cache cluster, specify all cache cluster node ids. Pass a string for a single value, or an indexed array for multiple values.
|
537 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
538 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
539 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
540 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
541 |
+
*/
|
542 |
+
public function reboot_cache_cluster($cache_cluster_id, $cache_node_ids_to_reboot, $opt = null)
|
543 |
+
{
|
544 |
+
if (!$opt) $opt = array();
|
545 |
+
$opt['CacheClusterId'] = $cache_cluster_id;
|
546 |
+
|
547 |
+
// Required parameter
|
548 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
549 |
+
'CacheNodeIdsToReboot' => (is_array($cache_node_ids_to_reboot) ? $cache_node_ids_to_reboot : array($cache_node_ids_to_reboot))
|
550 |
+
), 'member'));
|
551 |
+
|
552 |
+
return $this->authenticate('RebootCacheCluster', $opt, $this->hostname);
|
553 |
+
}
|
554 |
+
|
555 |
+
/**
|
556 |
+
*
|
557 |
+
* Revokes ingress from a CacheSecurityGroup for previously authorized EC2 Security Groups.
|
558 |
+
*
|
559 |
+
* @param string $cache_security_group_name (Required) The name of the Cache Security Group to revoke ingress from.
|
560 |
+
* @param string $ec2_security_group_name (Required) The name of the EC2 Security Group to revoke access from.
|
561 |
+
* @param string $ec2_security_group_owner_id (Required) The AWS Account Number of the owner of the security group specified in the <i>EC2SecurityGroupName</i> parameter. The AWS Access Key ID is not an acceptable value.
|
562 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
563 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
564 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
565 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
566 |
+
*/
|
567 |
+
public function revoke_cache_security_group_ingress($cache_security_group_name, $ec2_security_group_name, $ec2_security_group_owner_id, $opt = null)
|
568 |
+
{
|
569 |
+
if (!$opt) $opt = array();
|
570 |
+
$opt['CacheSecurityGroupName'] = $cache_security_group_name;
|
571 |
+
$opt['EC2SecurityGroupName'] = $ec2_security_group_name;
|
572 |
+
$opt['EC2SecurityGroupOwnerId'] = $ec2_security_group_owner_id;
|
573 |
+
|
574 |
+
return $this->authenticate('RevokeCacheSecurityGroupIngress', $opt, $this->hostname);
|
575 |
+
}
|
576 |
+
}
|
577 |
+
|
578 |
+
|
579 |
+
/*%******************************************************************************************%*/
|
580 |
+
// EXCEPTIONS
|
581 |
+
|
582 |
+
/**
|
583 |
+
* Default ElastiCache Exception.
|
584 |
+
*/
|
585 |
+
class ElastiCache_Exception extends Exception {}
|
libs/aws/services/elasticbeanstalk.class.php
CHANGED
@@ -35,7 +35,7 @@
|
|
35 |
*
|
36 |
* </ul>
|
37 |
*
|
38 |
-
* @version
|
39 |
* @license See the included NOTICE.md file for complete information.
|
40 |
* @copyright See the included NOTICE.md file for complete information.
|
41 |
* @link http://aws.amazon.com/elasticbeanstalk/AWS Elastic Beanstalk
|
35 |
*
|
36 |
* </ul>
|
37 |
*
|
38 |
+
* @version Thu Sep 01 21:19:18 PDT 2011
|
39 |
* @license See the included NOTICE.md file for complete information.
|
40 |
* @copyright See the included NOTICE.md file for complete information.
|
41 |
* @link http://aws.amazon.com/elasticbeanstalk/AWS Elastic Beanstalk
|
libs/aws/services/elb.class.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
* application. It makes it easy for you to distribute application loads between two or more EC2 instances. Elastic Load Balancing enables
|
22 |
* availability through redundancy and supports traffic growth of your application.
|
23 |
*
|
24 |
-
* @version
|
25 |
* @license See the included NOTICE.md file for complete information.
|
26 |
* @copyright See the included NOTICE.md file for complete information.
|
27 |
* @link http://aws.amazon.com/elasticloadbalancing/Amazon Elastic Load Balancing
|
@@ -92,7 +92,7 @@ class AmazonELB extends CFRuntime
|
|
92 |
*/
|
93 |
public function __construct($key = null, $secret_key = null)
|
94 |
{
|
95 |
-
$this->api_version = '2011-
|
96 |
$this->hostname = self::DEFAULT_URL;
|
97 |
|
98 |
if (!$key && !defined('AWS_KEY'))
|
@@ -118,60 +118,147 @@ class AmazonELB extends CFRuntime
|
|
118 |
|
119 |
/**
|
120 |
*
|
121 |
-
*
|
122 |
*
|
123 |
-
*
|
124 |
-
*
|
125 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
*
|
127 |
-
*
|
|
|
|
|
128 |
*
|
129 |
-
*
|
130 |
-
* with
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
*
|
132 |
-
*
|
|
|
133 |
*
|
134 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
*
|
136 |
-
*
|
137 |
*
|
138 |
-
*
|
|
|
|
|
139 |
*
|
140 |
-
*
|
|
|
141 |
*
|
142 |
-
*
|
|
|
143 |
*
|
144 |
-
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within
|
145 |
-
* @param array $
|
146 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
147 |
-
* <li><code>
|
148 |
-
* <li><code>LoadBalancerPort</code> - <code>integer</code> - Required - Specifies the external LoadBalancer port number. This property cannot be modified for the life of the LoadBalancer. </li>
|
149 |
-
* <li><code>InstancePort</code> - <code>integer</code> - Required - Specifies the TCP port on which the instance server is listening. This property cannot be modified for the life of the LoadBalancer. </li>
|
150 |
-
* <li><code>SSLCertificateId</code> - <code>string</code> - Optional - The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Keys and Certificates in the AWS Identity and Access Management documentation. </li>
|
151 |
* </ul></li>
|
152 |
* </ul>
|
153 |
-
* @param string|array $availability_zones (Required) A list of Availability Zones. At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the LoadBalancer. Traffic will be equally distributed across all zones. This list can be modified after the creation of the LoadBalancer. Pass a string for a single value, or an indexed array for multiple values.
|
154 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
155 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
156 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
157 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
158 |
*/
|
159 |
-
public function
|
160 |
{
|
161 |
if (!$opt) $opt = array();
|
162 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
163 |
|
164 |
// Required parameter
|
165 |
$opt = array_merge($opt, CFComplexType::map(array(
|
166 |
-
'
|
167 |
), 'member'));
|
168 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
169 |
// Required parameter
|
170 |
$opt = array_merge($opt, CFComplexType::map(array(
|
171 |
-
'
|
172 |
), 'member'));
|
173 |
|
174 |
-
return $this->authenticate('
|
175 |
}
|
176 |
|
177 |
/**
|
@@ -200,117 +287,167 @@ class AmazonELB extends CFRuntime
|
|
200 |
|
201 |
/**
|
202 |
*
|
203 |
-
*
|
204 |
-
*
|
205 |
*
|
206 |
-
*
|
207 |
-
*
|
|
|
|
|
|
|
|
|
|
|
208 |
*
|
209 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
|
|
210 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
211 |
-
* <li><code>
|
212 |
-
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
213 |
-
* <li><code>InstanceId</code> - <code>string</code> - Optional - Provides an EC2 instance ID. </li>
|
214 |
-
* </ul></li>
|
215 |
-
* </ul></li>
|
216 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
217 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
218 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
219 |
*/
|
220 |
-
public function
|
221 |
{
|
222 |
if (!$opt) $opt = array();
|
223 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
// Optional parameter
|
226 |
-
if (isset($opt['
|
227 |
{
|
228 |
$opt = array_merge($opt, CFComplexType::map(array(
|
229 |
-
'
|
230 |
), 'member'));
|
231 |
-
unset($opt['
|
232 |
}
|
233 |
|
234 |
-
return $this->authenticate('
|
235 |
}
|
236 |
|
237 |
/**
|
238 |
*
|
239 |
-
*
|
|
|
|
|
240 |
*
|
241 |
-
* If attempting to recreate the LoadBalancer, the client must reconfigure all the settings. The DNS name associated with a deleted
|
242 |
-
* LoadBalancer will no longer be usable. Once deleted, the name and associated DNS record of the LoadBalancer no longer exist and traffic sent
|
243 |
-
* to any of its IP addresses will no longer be delivered to client instances. The client will not receive the same DNS name even if a new
|
244 |
-
* LoadBalancer with same LoadBalancerName is created.
|
245 |
-
*
|
246 |
-
* To successfully call this API, the client must provide the same account credentials as were used to create the LoadBalancer.
|
247 |
-
*
|
248 |
-
* By design, if the LoadBalancer does not exist or has already been deleted, DeleteLoadBalancer still succeeds.
|
249 |
-
*
|
250 |
-
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
251 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
|
|
252 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
253 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
254 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
255 |
*/
|
256 |
-
public function
|
257 |
{
|
258 |
if (!$opt) $opt = array();
|
259 |
-
$opt['LoadBalancerName'] = $load_balancer_name;
|
260 |
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
262 |
}
|
263 |
|
264 |
/**
|
265 |
*
|
266 |
-
*
|
267 |
-
* expiration period. This policy can be associated only with HTTP/HTTPS listeners.
|
268 |
*
|
269 |
-
*
|
270 |
-
*
|
271 |
-
*
|
272 |
-
*
|
|
|
273 |
*
|
274 |
-
*
|
275 |
-
*
|
276 |
*
|
277 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
278 |
-
* @param string $
|
279 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
280 |
-
* <li><code>CookieExpirationPeriod</code> - <code>long</code> - Optional - The time period in seconds after which the cookie should be considered stale. Not specifying this parameter indicates that the sticky session will last for the duration of the browser session. </li>
|
281 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
282 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
283 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
284 |
*/
|
285 |
-
public function
|
286 |
{
|
287 |
if (!$opt) $opt = array();
|
288 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
289 |
-
$opt['PolicyName'] = $policy_name;
|
290 |
|
291 |
-
|
|
|
|
|
|
|
|
|
|
|
292 |
}
|
293 |
|
294 |
/**
|
295 |
*
|
296 |
-
* Creates
|
297 |
-
* be created; otherwise, the properties of the new listener must match the properties of the existing listener.
|
298 |
*
|
299 |
-
*
|
300 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
302 |
* <li><code>Protocol</code> - <code>string</code> - Required - Specifies the LoadBalancer transport protocol to use for routing - TCP or HTTP. This property cannot be modified for the life of the LoadBalancer. </li>
|
303 |
* <li><code>LoadBalancerPort</code> - <code>integer</code> - Required - Specifies the external LoadBalancer port number. This property cannot be modified for the life of the LoadBalancer. </li>
|
|
|
304 |
* <li><code>InstancePort</code> - <code>integer</code> - Required - Specifies the TCP port on which the instance server is listening. This property cannot be modified for the life of the LoadBalancer. </li>
|
305 |
* <li><code>SSLCertificateId</code> - <code>string</code> - Optional - The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Keys and Certificates in the AWS Identity and Access Management documentation. </li>
|
306 |
* </ul></li>
|
307 |
* </ul>
|
|
|
308 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
309 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
310 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
311 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
312 |
*/
|
313 |
-
public function
|
314 |
{
|
315 |
if (!$opt) $opt = array();
|
316 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
@@ -320,70 +457,79 @@ class AmazonELB extends CFRuntime
|
|
320 |
'Listeners' => (is_array($listeners) ? $listeners : array($listeners))
|
321 |
), 'member'));
|
322 |
|
323 |
-
|
|
|
|
|
|
|
|
|
|
|
324 |
}
|
325 |
|
326 |
/**
|
327 |
*
|
328 |
-
*
|
329 |
-
* configuration information for all LoadBalancers created by the caller.
|
330 |
*
|
331 |
-
* The
|
332 |
-
*
|
333 |
*
|
|
|
|
|
|
|
|
|
334 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
335 |
-
* <li><code>LoadBalancerNames</code> - <code>string|array</code> - Optional - A list of names associated with the LoadBalancers at creation time. Pass a string for a single value, or an indexed array for multiple values. </li>
|
336 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
337 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
338 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
339 |
*/
|
340 |
-
public function
|
341 |
{
|
342 |
if (!$opt) $opt = array();
|
|
|
343 |
|
344 |
-
//
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
'LoadBalancerNames' => (is_array($opt['LoadBalancerNames']) ? $opt['LoadBalancerNames'] : array($opt['LoadBalancerNames']))
|
349 |
-
), 'member'));
|
350 |
-
unset($opt['LoadBalancerNames']);
|
351 |
-
}
|
352 |
|
353 |
-
return $this->authenticate('
|
354 |
}
|
355 |
|
356 |
/**
|
357 |
*
|
358 |
-
*
|
|
|
359 |
*
|
360 |
-
*
|
361 |
-
*
|
362 |
-
*
|
363 |
-
* among its remaining usable Availability Zones. Trying to remove an Availability Zone that was not associated with the LoadBalancer does
|
364 |
-
* nothing.
|
365 |
-
*
|
366 |
-
* In order for this call to be successful, the client must have created the LoadBalancer. The client must provide the same account
|
367 |
-
* credentials as those that were used to create the LoadBalancer.
|
368 |
-
*
|
369 |
-
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
370 |
-
* @param string|array $availability_zones (Required) A list of Availability Zones to be removed from the LoadBalancer. There must be at least one Availability Zone registered with a LoadBalancer at all times. The client cannot remove all the Availability Zones from a LoadBalancer. Specified Availability Zones must be in the same Region. Pass a string for a single value, or an indexed array for multiple values.
|
371 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
373 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
374 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
375 |
*/
|
376 |
-
public function
|
377 |
{
|
378 |
if (!$opt) $opt = array();
|
379 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
|
|
|
|
380 |
|
381 |
-
//
|
382 |
-
|
383 |
-
|
384 |
-
|
|
|
|
|
|
|
|
|
385 |
|
386 |
-
return $this->authenticate('
|
387 |
}
|
388 |
|
389 |
/**
|
@@ -422,7 +568,7 @@ class AmazonELB extends CFRuntime
|
|
422 |
* associated only with HTTP/HTTPS listeners.
|
423 |
*
|
424 |
* This policy is similar to the policy created by CreateLBCookieStickinessPolicy, except that the lifetime of the special Elastic Load
|
425 |
-
* Balancing cookie follows the lifetime of the application-generated cookie specified in the policy configuration. The
|
426 |
* inserts a new stickiness cookie when the application response includes a new application cookie.
|
427 |
*
|
428 |
* If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.
|
@@ -431,7 +577,7 @@ class AmazonELB extends CFRuntime
|
|
431 |
* named <code>AWSELB</code>. This is the default behavior for many common web browsers.
|
432 |
*
|
433 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
434 |
-
* @param string $policy_name (Required) The name of the policy being created. The name must be unique within the set of policies for this
|
435 |
* @param string $cookie_name (Required) Name of the application cookie used for stickiness.
|
436 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
437 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
@@ -450,63 +596,29 @@ class AmazonELB extends CFRuntime
|
|
450 |
|
451 |
/**
|
452 |
*
|
453 |
-
*
|
454 |
*
|
455 |
-
*
|
456 |
-
*
|
457 |
-
*
|
|
|
458 |
*
|
459 |
-
*
|
460 |
-
* credentials as those that were used to create the LoadBalancer.
|
461 |
*
|
462 |
-
*
|
463 |
-
* changes will happen shortly.
|
464 |
*
|
465 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
466 |
-
* @param array $instances (Required) A list of instances IDs that should be registered with the LoadBalancer. <ul>
|
467 |
-
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
468 |
-
* <li><code>InstanceId</code> - <code>string</code> - Optional - Provides an EC2 instance ID. </li>
|
469 |
-
* </ul></li>
|
470 |
-
* </ul>
|
471 |
-
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
472 |
-
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
473 |
-
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
474 |
-
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
475 |
-
*/
|
476 |
-
public function register_instances_with_load_balancer($load_balancer_name, $instances, $opt = null)
|
477 |
-
{
|
478 |
-
if (!$opt) $opt = array();
|
479 |
-
$opt['LoadBalancerName'] = $load_balancer_name;
|
480 |
-
|
481 |
-
// Required parameter
|
482 |
-
$opt = array_merge($opt, CFComplexType::map(array(
|
483 |
-
'Instances' => (is_array($instances) ? $instances : array($instances))
|
484 |
-
), 'member'));
|
485 |
-
|
486 |
-
return $this->authenticate('RegisterInstancesWithLoadBalancer', $opt, $this->hostname);
|
487 |
-
}
|
488 |
-
|
489 |
-
/**
|
490 |
-
*
|
491 |
-
* Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate
|
492 |
-
* that was used on the same LoadBalancer and port.
|
493 |
-
*
|
494 |
-
* @param string $load_balancer_name (Required) The name of the the LoadBalancer.
|
495 |
-
* @param integer $load_balancer_port (Required) The port that uses the specified SSL certificate.
|
496 |
-
* @param string $ssl_certificate_id (Required) The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Server Certificates in the AWS Identity and Access Management documentation.
|
497 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
498 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
499 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
500 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
501 |
*/
|
502 |
-
public function
|
503 |
{
|
504 |
if (!$opt) $opt = array();
|
505 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
506 |
-
$opt['LoadBalancerPort'] = $load_balancer_port;
|
507 |
-
$opt['SSLCertificateId'] = $ssl_certificate_id;
|
508 |
|
509 |
-
return $this->authenticate('
|
510 |
}
|
511 |
|
512 |
/**
|
@@ -531,88 +643,101 @@ class AmazonELB extends CFRuntime
|
|
531 |
|
532 |
/**
|
533 |
*
|
534 |
-
*
|
535 |
-
*
|
|
|
|
|
|
|
536 |
*
|
537 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
538 |
-
* @param integer $load_balancer_port (Required) The external port of the LoadBalancer with which this policy has to be associated.
|
539 |
-
* @param string|array $policy_names (Required) List of policies to be associated with the listener. Currently this list can have at most one policy. If the list is empty, the current policy is removed from the listener. Pass a string for a single value, or an indexed array for multiple values.
|
540 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
|
|
|
|
|
|
|
|
|
|
541 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
542 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
543 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
544 |
*/
|
545 |
-
public function
|
546 |
{
|
547 |
if (!$opt) $opt = array();
|
548 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
549 |
-
$opt['LoadBalancerPort'] = $load_balancer_port;
|
550 |
|
551 |
-
//
|
552 |
-
|
553 |
-
|
554 |
-
|
|
|
|
|
|
|
|
|
555 |
|
556 |
-
return $this->authenticate('
|
557 |
}
|
558 |
|
559 |
/**
|
560 |
*
|
561 |
-
*
|
562 |
-
*
|
563 |
-
* The LoadBalancer evenly distributes requests across all its registered Availability Zones that contain instances. As a result, the client
|
564 |
-
* must ensure that its LoadBalancer is appropriately scaled for each registered Availability Zone.
|
565 |
*
|
566 |
-
* The
|
|
|
567 |
*
|
568 |
-
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
569 |
-
* @param string|array $availability_zones (Required) A list of new Availability Zones for the LoadBalancer. Each Availability Zone must be in the same Region as the LoadBalancer. Pass a string for a single value, or an indexed array for multiple values.
|
570 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
|
|
571 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
572 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
573 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
574 |
*/
|
575 |
-
public function
|
576 |
{
|
577 |
if (!$opt) $opt = array();
|
578 |
-
$opt['LoadBalancerName'] = $load_balancer_name;
|
579 |
|
580 |
-
//
|
581 |
-
|
582 |
-
|
583 |
-
|
|
|
|
|
|
|
|
|
584 |
|
585 |
-
return $this->authenticate('
|
586 |
}
|
587 |
|
588 |
/**
|
589 |
*
|
590 |
-
*
|
|
|
591 |
*
|
592 |
-
* @param string $load_balancer_name (Required) The
|
593 |
-
* @param array $
|
594 |
-
* <li><code>
|
595 |
-
*
|
596 |
-
*
|
597 |
-
*
|
598 |
-
*
|
|
|
|
|
599 |
* </ul>
|
600 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
601 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
602 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
603 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
604 |
*/
|
605 |
-
public function
|
606 |
{
|
607 |
if (!$opt) $opt = array();
|
608 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
609 |
|
610 |
// Required parameter
|
611 |
$opt = array_merge($opt, CFComplexType::map(array(
|
612 |
-
'
|
613 |
), 'member'));
|
614 |
|
615 |
-
return $this->authenticate('
|
616 |
}
|
617 |
}
|
618 |
|
21 |
* application. It makes it easy for you to distribute application loads between two or more EC2 instances. Elastic Load Balancing enables
|
22 |
* availability through redundancy and supports traffic growth of your application.
|
23 |
*
|
24 |
+
* @version Thu Sep 01 21:20:23 PDT 2011
|
25 |
* @license See the included NOTICE.md file for complete information.
|
26 |
* @copyright See the included NOTICE.md file for complete information.
|
27 |
* @link http://aws.amazon.com/elasticloadbalancing/Amazon Elastic Load Balancing
|
92 |
*/
|
93 |
public function __construct($key = null, $secret_key = null)
|
94 |
{
|
95 |
+
$this->api_version = '2011-08-15';
|
96 |
$this->hostname = self::DEFAULT_URL;
|
97 |
|
98 |
if (!$key && !defined('AWS_KEY'))
|
118 |
|
119 |
/**
|
120 |
*
|
121 |
+
* Enables the client to define an application healthcheck for the instances.
|
122 |
*
|
123 |
+
* @param string $load_balancer_name (Required) The mnemonic name associated with the LoadBalancer. This name must be unique within the client AWS account.
|
124 |
+
* @param array $health_check (Required) A structure containing the configuration information for the new healthcheck. <ul>
|
125 |
+
* <li><code>Target</code> - <code>string</code> - Required - Specifies the instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL. The range of valid ports is one (1) through 65535. TCP is the default, specified as a TCP: port pair, for example "TCP:5000". In this case a healthcheck simply attempts to open a TCP connection to the instance on the specified port. Failure to connect within the configured timeout is considered unhealthy. SSL is also specified as SSL: port pair, for example, SSL:5000. For HTTP or HTTPS protocol, the situation is different. You have to include a ping path in the string. HTTP is specified as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". In this case, a HTTP GET request is issued to the instance on the given port and path. Any answer other than "200 OK" within the timeout period is considered unhealthy. The total length of the HTTP ping target needs to be 1024 16-bit Unicode characters or less. </li>
|
126 |
+
* <li><code>Interval</code> - <code>integer</code> - Required - Specifies the approximate interval, in seconds, between health checks of an individual instance. </li>
|
127 |
+
* <li><code>Timeout</code> - <code>integer</code> - Required - Specifies the amount of time, in seconds, during which no response means a failed health probe. This value must be less than the <i>Interval</i> value. </li>
|
128 |
+
* <li><code>UnhealthyThreshold</code> - <code>integer</code> - Required - Specifies the number of consecutive health probe failures required before moving the instance to the <i>Unhealthy</i> state. </li>
|
129 |
+
* <li><code>HealthyThreshold</code> - <code>integer</code> - Required - Specifies the number of consecutive health probe successes required before moving the instance to the <i>Healthy</i> state. </li>
|
130 |
+
* </ul>
|
131 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
132 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
133 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
134 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
135 |
+
*/
|
136 |
+
public function configure_health_check($load_balancer_name, $health_check, $opt = null)
|
137 |
+
{
|
138 |
+
if (!$opt) $opt = array();
|
139 |
+
$opt['LoadBalancerName'] = $load_balancer_name;
|
140 |
+
|
141 |
+
// Required parameter
|
142 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
143 |
+
'HealthCheck' => (is_array($health_check) ? $health_check : array($health_check))
|
144 |
+
), 'member'));
|
145 |
+
|
146 |
+
return $this->authenticate('ConfigureHealthCheck', $opt, $this->hostname);
|
147 |
+
}
|
148 |
+
|
149 |
+
/**
|
150 |
*
|
151 |
+
* Replaces the current set of policies associated with a port on which the back-end server is listening with a new set of policies. After the
|
152 |
+
* policies have been created using CreateLoadBalancerPolicy, they can be applied here as a list. At this time, only the back-end server
|
153 |
+
* authentication policy type can be applied to the back-end ports; this policy type is composed of multiple public key policies.
|
154 |
*
|
155 |
+
* @param string $load_balancer_name (Required) The mnemonic name associated with the LoadBalancer. This name must be unique within the client AWS account.
|
156 |
+
* @param integer $instance_port (Required) The port number associated with the back-end server.
|
157 |
+
* @param string|array $policy_names (Required) List of policy names to be set. If the list is empty, then all current polices are removed from the back-end server. Pass a string for a single value, or an indexed array for multiple values.
|
158 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
159 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
160 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
161 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
162 |
+
*/
|
163 |
+
public function set_load_balancer_policies_for_backend_server($load_balancer_name, $instance_port, $policy_names, $opt = null)
|
164 |
+
{
|
165 |
+
if (!$opt) $opt = array();
|
166 |
+
$opt['LoadBalancerName'] = $load_balancer_name;
|
167 |
+
$opt['InstancePort'] = $instance_port;
|
168 |
+
|
169 |
+
// Required parameter
|
170 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
171 |
+
'PolicyNames' => (is_array($policy_names) ? $policy_names : array($policy_names))
|
172 |
+
), 'member'));
|
173 |
+
|
174 |
+
return $this->authenticate('SetLoadBalancerPoliciesForBackendServer', $opt, $this->hostname);
|
175 |
+
}
|
176 |
+
|
177 |
+
/**
|
178 |
*
|
179 |
+
* Sets the certificate that terminates the specified listener's SSL connections. The specified certificate replaces any prior certificate
|
180 |
+
* that was used on the same LoadBalancer and port.
|
181 |
*
|
182 |
+
* @param string $load_balancer_name (Required) The name of the the LoadBalancer.
|
183 |
+
* @param integer $load_balancer_port (Required) The port that uses the specified SSL certificate.
|
184 |
+
* @param string $ssl_certificate_id (Required) The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Server Certificates in the AWS Identity and Access Management documentation.
|
185 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
186 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
187 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
188 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
189 |
+
*/
|
190 |
+
public function set_load_balancer_listener_ssl_certificate($load_balancer_name, $load_balancer_port, $ssl_certificate_id, $opt = null)
|
191 |
+
{
|
192 |
+
if (!$opt) $opt = array();
|
193 |
+
$opt['LoadBalancerName'] = $load_balancer_name;
|
194 |
+
$opt['LoadBalancerPort'] = $load_balancer_port;
|
195 |
+
$opt['SSLCertificateId'] = $ssl_certificate_id;
|
196 |
+
|
197 |
+
return $this->authenticate('SetLoadBalancerListenerSSLCertificate', $opt, $this->hostname);
|
198 |
+
}
|
199 |
+
|
200 |
+
/**
|
201 |
*
|
202 |
+
* Adds new instances to the LoadBalancer.
|
203 |
*
|
204 |
+
* Once the instance is registered, it starts receiving traffic and requests from the LoadBalancer. Any instance that is not in any of the
|
205 |
+
* Availability Zones registered for the LoadBalancer will be moved to the <i>OutOfService</i> state. It will move to the <i>InService</i>
|
206 |
+
* state when the Availability Zone is added to the LoadBalancer.
|
207 |
*
|
208 |
+
* In order for this call to be successful, the client must have created the LoadBalancer. The client must provide the same account
|
209 |
+
* credentials as those that were used to create the LoadBalancer.
|
210 |
*
|
211 |
+
* Completion of this API does not guarantee that operation has completed. Rather, it means that the request has been registered and the
|
212 |
+
* changes will happen shortly.
|
213 |
*
|
214 |
+
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
215 |
+
* @param array $instances (Required) A list of instances IDs that should be registered with the LoadBalancer. <ul>
|
216 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
217 |
+
* <li><code>InstanceId</code> - <code>string</code> - Optional - Provides an EC2 instance ID. </li>
|
|
|
|
|
|
|
218 |
* </ul></li>
|
219 |
* </ul>
|
|
|
220 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
221 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
222 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
223 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
224 |
*/
|
225 |
+
public function register_instances_with_load_balancer($load_balancer_name, $instances, $opt = null)
|
226 |
{
|
227 |
if (!$opt) $opt = array();
|
228 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
229 |
|
230 |
// Required parameter
|
231 |
$opt = array_merge($opt, CFComplexType::map(array(
|
232 |
+
'Instances' => (is_array($instances) ? $instances : array($instances))
|
233 |
), 'member'));
|
234 |
|
235 |
+
return $this->authenticate('RegisterInstancesWithLoadBalancer', $opt, $this->hostname);
|
236 |
+
}
|
237 |
+
|
238 |
+
/**
|
239 |
+
*
|
240 |
+
* Associates, updates, or disables a policy with a listener on the LoadBalancer. You can associate multiple policies with a listener.
|
241 |
+
*
|
242 |
+
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
243 |
+
* @param integer $load_balancer_port (Required) The external port of the LoadBalancer with which this policy applies to.
|
244 |
+
* @param string|array $policy_names (Required) List of policies to be associated with the listener. Currently this list can have at most one policy. If the list is empty, the current policy is removed from the listener. Pass a string for a single value, or an indexed array for multiple values.
|
245 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
246 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
247 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
248 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
249 |
+
*/
|
250 |
+
public function set_load_balancer_policies_of_listener($load_balancer_name, $load_balancer_port, $policy_names, $opt = null)
|
251 |
+
{
|
252 |
+
if (!$opt) $opt = array();
|
253 |
+
$opt['LoadBalancerName'] = $load_balancer_name;
|
254 |
+
$opt['LoadBalancerPort'] = $load_balancer_port;
|
255 |
+
|
256 |
// Required parameter
|
257 |
$opt = array_merge($opt, CFComplexType::map(array(
|
258 |
+
'PolicyNames' => (is_array($policy_names) ? $policy_names : array($policy_names))
|
259 |
), 'member'));
|
260 |
|
261 |
+
return $this->authenticate('SetLoadBalancerPoliciesOfListener', $opt, $this->hostname);
|
262 |
}
|
263 |
|
264 |
/**
|
287 |
|
288 |
/**
|
289 |
*
|
290 |
+
* Generates a stickiness policy with sticky session lifetimes controlled by the lifetime of the browser (user-agent) or a specified
|
291 |
+
* expiration period. This policy can be associated only with HTTP/HTTPS listeners.
|
292 |
*
|
293 |
+
* When a LoadBalancer implements this policy, the LoadBalancer uses a special cookie to track the backend server instance for each request.
|
294 |
+
* When the LoadBalancer receives a request, it first checks to see if this cookie is present in the request. If so, the LoadBalancer sends the
|
295 |
+
* request to the application server specified in the cookie. If not, the LoadBalancer sends the request to a server that is chosen based on
|
296 |
+
* the existing load balancing algorithm.
|
297 |
+
*
|
298 |
+
* A cookie is inserted into the response for binding subsequent requests from the same user to that server. The validity of the cookie is
|
299 |
+
* based on the cookie expiration time, which is specified in the policy configuration.
|
300 |
*
|
301 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
302 |
+
* @param string $policy_name (Required) The name of the policy being created. The name must be unique within the set of policies for this LoadBalancer.
|
303 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
304 |
+
* <li><code>CookieExpirationPeriod</code> - <code>long</code> - Optional - The time period in seconds after which the cookie should be considered stale. Not specifying this parameter indicates that the sticky session will last for the duration of the browser session. </li>
|
|
|
|
|
|
|
|
|
305 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
306 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
307 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
308 |
*/
|
309 |
+
public function create_lb_cookie_stickiness_policy($load_balancer_name, $policy_name, $opt = null)
|
310 |
{
|
311 |
if (!$opt) $opt = array();
|
312 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
313 |
+
$opt['PolicyName'] = $policy_name;
|
314 |
+
|
315 |
+
return $this->authenticate('CreateLBCookieStickinessPolicy', $opt, $this->hostname);
|
316 |
+
}
|
317 |
+
|
318 |
+
/**
|
319 |
+
*
|
320 |
+
* Returns detailed descriptions of the policies. If you specify a LoadBalancer name, the operation returns either the descriptions of the
|
321 |
+
* specified policies, or descriptions of all the policies created for the LoadBalancer. If you don't specify a LoadBalancer name, the
|
322 |
+
* operation returns descriptions of the specified sample policies, or descriptions of all the sample policies. The names of the sample
|
323 |
+
* policies have the <code>ELBSample-</code> prefix.
|
324 |
+
*
|
325 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
326 |
+
* <li><code>LoadBalancerName</code> - <code>string</code> - Optional - The mnemonic name associated with the LoadBalancer. If no name is specified, the operation returns the attributes of either all the sample policies pre-defined by Elastic Load Balancing or the specified sample polices. </li>
|
327 |
+
* <li><code>PolicyNames</code> - <code>string|array</code> - Optional - The names of LoadBalancer policies you've created or Elastic Load Balancing sample policy names. Pass a string for a single value, or an indexed array for multiple values. </li>
|
328 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
329 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
330 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
331 |
+
*/
|
332 |
+
public function describe_load_balancer_policies($opt = null)
|
333 |
+
{
|
334 |
+
if (!$opt) $opt = array();
|
335 |
|
336 |
// Optional parameter
|
337 |
+
if (isset($opt['PolicyNames']))
|
338 |
{
|
339 |
$opt = array_merge($opt, CFComplexType::map(array(
|
340 |
+
'PolicyNames' => (is_array($opt['PolicyNames']) ? $opt['PolicyNames'] : array($opt['PolicyNames']))
|
341 |
), 'member'));
|
342 |
+
unset($opt['PolicyNames']);
|
343 |
}
|
344 |
|
345 |
+
return $this->authenticate('DescribeLoadBalancerPolicies', $opt, $this->hostname);
|
346 |
}
|
347 |
|
348 |
/**
|
349 |
*
|
350 |
+
* Returns meta-information on the specified LoadBalancer policies defined by the Elastic Load Balancing service. The policy types that are
|
351 |
+
* returned from this action can be used in a CreateLoadBalancerPolicy action to instantiate specific policy configurations that will be
|
352 |
+
* applied to an Elastic LoadBalancer.
|
353 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
355 |
+
* <li><code>PolicyTypeNames</code> - <code>string|array</code> - Optional - Specifies the name of the policy types. If no names are specified, returns the description of all the policy types defined by Elastic Load Balancing service. Pass a string for a single value, or an indexed array for multiple values. </li>
|
356 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
357 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
358 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
359 |
*/
|
360 |
+
public function describe_load_balancer_policy_types($opt = null)
|
361 |
{
|
362 |
if (!$opt) $opt = array();
|
|
|
363 |
|
364 |
+
// Optional parameter
|
365 |
+
if (isset($opt['PolicyTypeNames']))
|
366 |
+
{
|
367 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
368 |
+
'PolicyTypeNames' => (is_array($opt['PolicyTypeNames']) ? $opt['PolicyTypeNames'] : array($opt['PolicyTypeNames']))
|
369 |
+
), 'member'));
|
370 |
+
unset($opt['PolicyTypeNames']);
|
371 |
+
}
|
372 |
+
|
373 |
+
return $this->authenticate('DescribeLoadBalancerPolicyTypes', $opt, $this->hostname);
|
374 |
}
|
375 |
|
376 |
/**
|
377 |
*
|
378 |
+
* Removes the specified EC2 Availability Zones from the set of configured Availability Zones for the LoadBalancer.
|
|
|
379 |
*
|
380 |
+
* There must be at least one Availability Zone registered with a LoadBalancer at all times. A client cannot remove all the Availability Zones
|
381 |
+
* from a LoadBalancer. Once an Availability Zone is removed, all the instances registered with the LoadBalancer that are in the removed
|
382 |
+
* Availability Zone go into the OutOfService state. Upon Availability Zone removal, the LoadBalancer attempts to equally balance the traffic
|
383 |
+
* among its remaining usable Availability Zones. Trying to remove an Availability Zone that was not associated with the LoadBalancer does
|
384 |
+
* nothing.
|
385 |
*
|
386 |
+
* In order for this call to be successful, the client must have created the LoadBalancer. The client must provide the same account
|
387 |
+
* credentials as those that were used to create the LoadBalancer.
|
388 |
*
|
389 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
390 |
+
* @param string|array $availability_zones (Required) A list of Availability Zones to be removed from the LoadBalancer. There must be at least one Availability Zone registered with a LoadBalancer at all times. The client cannot remove all the Availability Zones from a LoadBalancer. Specified Availability Zones must be in the same Region. Pass a string for a single value, or an indexed array for multiple values.
|
391 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
|
|
392 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
393 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
394 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
395 |
*/
|
396 |
+
public function disable_availability_zones_for_load_balancer($load_balancer_name, $availability_zones, $opt = null)
|
397 |
{
|
398 |
if (!$opt) $opt = array();
|
399 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
|
|
400 |
|
401 |
+
// Required parameter
|
402 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
403 |
+
'AvailabilityZones' => (is_array($availability_zones) ? $availability_zones : array($availability_zones))
|
404 |
+
), 'member'));
|
405 |
+
|
406 |
+
return $this->authenticate('DisableAvailabilityZonesForLoadBalancer', $opt, $this->hostname);
|
407 |
}
|
408 |
|
409 |
/**
|
410 |
*
|
411 |
+
* Creates a new LoadBalancer.
|
|
|
412 |
*
|
413 |
+
* After the call has completed successfully, a new LoadBalancer is created; however, it will not be usable until at least one instance has
|
414 |
+
* been registered. When the LoadBalancer creation is completed, the client can check whether or not it is usable by using the
|
415 |
+
* DescribeInstanceHealth API. The LoadBalancer is usable as soon as any registered instance is <i>InService</i>.
|
416 |
+
*
|
417 |
+
* Currently, the client's quota of LoadBalancers is limited to ten per Region.
|
418 |
+
*
|
419 |
+
* LoadBalancer DNS names vary depending on the Region they're created in. For LoadBalancers created in the United States, the DNS name ends
|
420 |
+
* with:
|
421 |
+
*
|
422 |
+
* <ul> <li> <i>us-east-1.elb.amazonaws.com</i> (for the US Standard Region) </li>
|
423 |
+
*
|
424 |
+
* <li> <i>us-west-1.elb.amazonaws.com</i> (for the Northern California Region) </li>
|
425 |
+
*
|
426 |
+
* </ul>
|
427 |
+
*
|
428 |
+
* For LoadBalancers created in the EU (Ireland) Region, the DNS name ends with:
|
429 |
+
*
|
430 |
+
* <ul> <li> <i>eu-west-1.elb.amazonaws.com</i> </li>
|
431 |
+
*
|
432 |
+
* </ul>
|
433 |
+
*
|
434 |
+
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within your set of LoadBalancers.
|
435 |
+
* @param array $listeners (Required) A list of the following tuples: LoadBalancerPort, InstancePort, and Protocol. <ul>
|
436 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
437 |
* <li><code>Protocol</code> - <code>string</code> - Required - Specifies the LoadBalancer transport protocol to use for routing - TCP or HTTP. This property cannot be modified for the life of the LoadBalancer. </li>
|
438 |
* <li><code>LoadBalancerPort</code> - <code>integer</code> - Required - Specifies the external LoadBalancer port number. This property cannot be modified for the life of the LoadBalancer. </li>
|
439 |
+
* <li><code>InstanceProtocol</code> - <code>string</code> - Optional - Specifies the protocol to use for routing traffic to back-end instances - HTTP, HTTPS, TCP, or SSL. This property cannot be modified for the life of the LoadBalancer. If the front-end protocol is HTTP or HTTPS, <code>InstanceProtocol</code> has to be at the same protocol layer, i.e., HTTP or HTTPS. Likewise, if the front-end protocol is TCP or SSL, InstanceProtocol has to be TCP or SSL. If there is another listener with the same <code>InstancePort</code> whose <code>InstanceProtocol</code> is secure, i.e., HTTPS or SSL, the listener's <code>InstanceProtocol</code> has to be secure, i.e., HTTPS or SSL. If there is another listener with the same <code>InstancePort</code> whose <code>InstanceProtocol</code> is HTTP or TCP, the listener's <code>InstanceProtocol</code> must be either HTTP or TCP. </li>
|
440 |
* <li><code>InstancePort</code> - <code>integer</code> - Required - Specifies the TCP port on which the instance server is listening. This property cannot be modified for the life of the LoadBalancer. </li>
|
441 |
* <li><code>SSLCertificateId</code> - <code>string</code> - Optional - The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Keys and Certificates in the AWS Identity and Access Management documentation. </li>
|
442 |
* </ul></li>
|
443 |
* </ul>
|
444 |
+
* @param string|array $availability_zones (Required) A list of Availability Zones. At least one Availability Zone must be specified. Specified Availability Zones must be in the same EC2 Region as the LoadBalancer. Traffic will be equally distributed across all zones. This list can be modified after the creation of the LoadBalancer. Pass a string for a single value, or an indexed array for multiple values.
|
445 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
446 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
447 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
448 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
449 |
*/
|
450 |
+
public function create_load_balancer($load_balancer_name, $listeners, $availability_zones, $opt = null)
|
451 |
{
|
452 |
if (!$opt) $opt = array();
|
453 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
457 |
'Listeners' => (is_array($listeners) ? $listeners : array($listeners))
|
458 |
), 'member'));
|
459 |
|
460 |
+
// Required parameter
|
461 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
462 |
+
'AvailabilityZones' => (is_array($availability_zones) ? $availability_zones : array($availability_zones))
|
463 |
+
), 'member'));
|
464 |
+
|
465 |
+
return $this->authenticate('CreateLoadBalancer', $opt, $this->hostname);
|
466 |
}
|
467 |
|
468 |
/**
|
469 |
*
|
470 |
+
* Adds one or more EC2 Availability Zones to the LoadBalancer.
|
|
|
471 |
*
|
472 |
+
* The LoadBalancer evenly distributes requests across all its registered Availability Zones that contain instances. As a result, the client
|
473 |
+
* must ensure that its LoadBalancer is appropriately scaled for each registered Availability Zone.
|
474 |
*
|
475 |
+
* The new EC2 Availability Zones to be added must be in the same EC2 Region as the Availability Zones for which the LoadBalancer was created.
|
476 |
+
*
|
477 |
+
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
478 |
+
* @param string|array $availability_zones (Required) A list of new Availability Zones for the LoadBalancer. Each Availability Zone must be in the same Region as the LoadBalancer. Pass a string for a single value, or an indexed array for multiple values.
|
479 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
|
|
480 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
481 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
482 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
483 |
*/
|
484 |
+
public function enable_availability_zones_for_load_balancer($load_balancer_name, $availability_zones, $opt = null)
|
485 |
{
|
486 |
if (!$opt) $opt = array();
|
487 |
+
$opt['LoadBalancerName'] = $load_balancer_name;
|
488 |
|
489 |
+
// Required parameter
|
490 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
491 |
+
'AvailabilityZones' => (is_array($availability_zones) ? $availability_zones : array($availability_zones))
|
492 |
+
), 'member'));
|
|
|
|
|
|
|
|
|
493 |
|
494 |
+
return $this->authenticate('EnableAvailabilityZonesForLoadBalancer', $opt, $this->hostname);
|
495 |
}
|
496 |
|
497 |
/**
|
498 |
*
|
499 |
+
* Creates a new policy that contains the necessary attributes depending on the policy type. Policies are settings that are saved for your
|
500 |
+
* Elastic LoadBalancer and that can be applied to the front-end listener, or the back-end application server, depending on your policy type.
|
501 |
*
|
502 |
+
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer for which the policy is being created. This name must be unique within the client AWS account.
|
503 |
+
* @param string $policy_name (Required) The name of the LoadBalancer policy being created. The name must be unique within the set of policies for this LoadBalancer.
|
504 |
+
* @param string $policy_type_name (Required) The name of the base policy type being used to create this policy. To get the list of policy types, use the DescribeLoadBalancerPolicyTypes action.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
505 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
506 |
+
* <li><code>PolicyAttributes</code> - <code>array</code> - Optional - A list of attributes associated with the policy being created. <ul>
|
507 |
+
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
508 |
+
* <li><code>AttributeName</code> - <code>string</code> - Optional - The name of the attribute associated with the policy. </li>
|
509 |
+
* <li><code>AttributeValue</code> - <code>string</code> - Optional - The value of the attribute associated with the policy. </li>
|
510 |
+
* </ul></li>
|
511 |
+
* </ul></li>
|
512 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
513 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
514 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
515 |
*/
|
516 |
+
public function create_load_balancer_policy($load_balancer_name, $policy_name, $policy_type_name, $opt = null)
|
517 |
{
|
518 |
if (!$opt) $opt = array();
|
519 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
520 |
+
$opt['PolicyName'] = $policy_name;
|
521 |
+
$opt['PolicyTypeName'] = $policy_type_name;
|
522 |
|
523 |
+
// Optional parameter
|
524 |
+
if (isset($opt['PolicyAttributes']))
|
525 |
+
{
|
526 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
527 |
+
'PolicyAttributes' => $opt['PolicyAttributes']
|
528 |
+
), 'member'));
|
529 |
+
unset($opt['PolicyAttributes']);
|
530 |
+
}
|
531 |
|
532 |
+
return $this->authenticate('CreateLoadBalancerPolicy', $opt, $this->hostname);
|
533 |
}
|
534 |
|
535 |
/**
|
568 |
* associated only with HTTP/HTTPS listeners.
|
569 |
*
|
570 |
* This policy is similar to the policy created by CreateLBCookieStickinessPolicy, except that the lifetime of the special Elastic Load
|
571 |
+
* Balancing cookie follows the lifetime of the application-generated cookie specified in the policy configuration. The LoadBalancer only
|
572 |
* inserts a new stickiness cookie when the application response includes a new application cookie.
|
573 |
*
|
574 |
* If the application cookie is explicitly removed or expires, the session stops being sticky until a new application cookie is issued.
|
577 |
* named <code>AWSELB</code>. This is the default behavior for many common web browsers.
|
578 |
*
|
579 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
580 |
+
* @param string $policy_name (Required) The name of the policy being created. The name must be unique within the set of policies for this LoadBalancer.
|
581 |
* @param string $cookie_name (Required) Name of the application cookie used for stickiness.
|
582 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
583 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
596 |
|
597 |
/**
|
598 |
*
|
599 |
+
* Deletes the specified LoadBalancer.
|
600 |
*
|
601 |
+
* If attempting to recreate the LoadBalancer, the client must reconfigure all the settings. The DNS name associated with a deleted
|
602 |
+
* LoadBalancer will no longer be usable. Once deleted, the name and associated DNS record of the LoadBalancer no longer exist and traffic sent
|
603 |
+
* to any of its IP addresses will no longer be delivered to client instances. The client will not receive the same DNS name even if a new
|
604 |
+
* LoadBalancer with same LoadBalancerName is created.
|
605 |
*
|
606 |
+
* To successfully call this API, the client must provide the same account credentials as were used to create the LoadBalancer.
|
|
|
607 |
*
|
608 |
+
* By design, if the LoadBalancer does not exist or has already been deleted, DeleteLoadBalancer still succeeds.
|
|
|
609 |
*
|
610 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
611 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
612 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
613 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
614 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
615 |
*/
|
616 |
+
public function delete_load_balancer($load_balancer_name, $opt = null)
|
617 |
{
|
618 |
if (!$opt) $opt = array();
|
619 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
|
|
|
|
620 |
|
621 |
+
return $this->authenticate('DeleteLoadBalancer', $opt, $this->hostname);
|
622 |
}
|
623 |
|
624 |
/**
|
643 |
|
644 |
/**
|
645 |
*
|
646 |
+
* Returns the current state of the instances of the specified LoadBalancer. If no instances are specified, the state of all the instances for
|
647 |
+
* the LoadBalancer is returned.
|
648 |
+
*
|
649 |
+
* The client must have created the specified input LoadBalancer in order to retrieve this information; the client must provide the same
|
650 |
+
* account credentials as those that were used to create the LoadBalancer.
|
651 |
*
|
652 |
* @param string $load_balancer_name (Required) The name associated with the LoadBalancer. The name must be unique within the client AWS account.
|
|
|
|
|
653 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
654 |
+
* <li><code>Instances</code> - <code>array</code> - Optional - A list of instance IDs whose states are being queried. <ul>
|
655 |
+
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
656 |
+
* <li><code>InstanceId</code> - <code>string</code> - Optional - Provides an EC2 instance ID. </li>
|
657 |
+
* </ul></li>
|
658 |
+
* </ul></li>
|
659 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
660 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
661 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
662 |
*/
|
663 |
+
public function describe_instance_health($load_balancer_name, $opt = null)
|
664 |
{
|
665 |
if (!$opt) $opt = array();
|
666 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
|
|
667 |
|
668 |
+
// Optional parameter
|
669 |
+
if (isset($opt['Instances']))
|
670 |
+
{
|
671 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
672 |
+
'Instances' => $opt['Instances']
|
673 |
+
), 'member'));
|
674 |
+
unset($opt['Instances']);
|
675 |
+
}
|
676 |
|
677 |
+
return $this->authenticate('DescribeInstanceHealth', $opt, $this->hostname);
|
678 |
}
|
679 |
|
680 |
/**
|
681 |
*
|
682 |
+
* Returns detailed configuration information for the specified LoadBalancers. If no LoadBalancers are specified, the operation returns
|
683 |
+
* configuration information for all LoadBalancers created by the caller.
|
|
|
|
|
684 |
*
|
685 |
+
* The client must have created the specified input LoadBalancers in order to retrieve this information; the client must provide the same
|
686 |
+
* account credentials as those that were used to create the LoadBalancer.
|
687 |
*
|
|
|
|
|
688 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
689 |
+
* <li><code>LoadBalancerNames</code> - <code>string|array</code> - Optional - A list of names associated with the LoadBalancers at creation time. Pass a string for a single value, or an indexed array for multiple values. </li>
|
690 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
691 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
692 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
693 |
*/
|
694 |
+
public function describe_load_balancers($opt = null)
|
695 |
{
|
696 |
if (!$opt) $opt = array();
|
|
|
697 |
|
698 |
+
// Optional parameter
|
699 |
+
if (isset($opt['LoadBalancerNames']))
|
700 |
+
{
|
701 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
702 |
+
'LoadBalancerNames' => (is_array($opt['LoadBalancerNames']) ? $opt['LoadBalancerNames'] : array($opt['LoadBalancerNames']))
|
703 |
+
), 'member'));
|
704 |
+
unset($opt['LoadBalancerNames']);
|
705 |
+
}
|
706 |
|
707 |
+
return $this->authenticate('DescribeLoadBalancers', $opt, $this->hostname);
|
708 |
}
|
709 |
|
710 |
/**
|
711 |
*
|
712 |
+
* Creates one or more listeners on a LoadBalancer for the specified port. If a listener with the given port does not already exist, it will
|
713 |
+
* be created; otherwise, the properties of the new listener must match the properties of the existing listener.
|
714 |
*
|
715 |
+
* @param string $load_balancer_name (Required) The name of the new LoadBalancer. The name must be unique within your AWS account.
|
716 |
+
* @param array $listeners (Required) A list of <code>LoadBalancerPort</code>, <code>InstancePort</code>, <code>Protocol</code>, and <code>SSLCertificateId</code> items. <ul>
|
717 |
+
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
718 |
+
* <li><code>Protocol</code> - <code>string</code> - Required - Specifies the LoadBalancer transport protocol to use for routing - TCP or HTTP. This property cannot be modified for the life of the LoadBalancer. </li>
|
719 |
+
* <li><code>LoadBalancerPort</code> - <code>integer</code> - Required - Specifies the external LoadBalancer port number. This property cannot be modified for the life of the LoadBalancer. </li>
|
720 |
+
* <li><code>InstanceProtocol</code> - <code>string</code> - Optional - Specifies the protocol to use for routing traffic to back-end instances - HTTP, HTTPS, TCP, or SSL. This property cannot be modified for the life of the LoadBalancer. If the front-end protocol is HTTP or HTTPS, <code>InstanceProtocol</code> has to be at the same protocol layer, i.e., HTTP or HTTPS. Likewise, if the front-end protocol is TCP or SSL, InstanceProtocol has to be TCP or SSL. If there is another listener with the same <code>InstancePort</code> whose <code>InstanceProtocol</code> is secure, i.e., HTTPS or SSL, the listener's <code>InstanceProtocol</code> has to be secure, i.e., HTTPS or SSL. If there is another listener with the same <code>InstancePort</code> whose <code>InstanceProtocol</code> is HTTP or TCP, the listener's <code>InstanceProtocol</code> must be either HTTP or TCP. </li>
|
721 |
+
* <li><code>InstancePort</code> - <code>integer</code> - Required - Specifies the TCP port on which the instance server is listening. This property cannot be modified for the life of the LoadBalancer. </li>
|
722 |
+
* <li><code>SSLCertificateId</code> - <code>string</code> - Optional - The ID of the SSL certificate chain to use. For more information on SSL certificates, see Managing Keys and Certificates in the AWS Identity and Access Management documentation. </li>
|
723 |
+
* </ul></li>
|
724 |
* </ul>
|
725 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
726 |
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
727 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
728 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
729 |
*/
|
730 |
+
public function create_load_balancer_listeners($load_balancer_name, $listeners, $opt = null)
|
731 |
{
|
732 |
if (!$opt) $opt = array();
|
733 |
$opt['LoadBalancerName'] = $load_balancer_name;
|
734 |
|
735 |
// Required parameter
|
736 |
$opt = array_merge($opt, CFComplexType::map(array(
|
737 |
+
'Listeners' => (is_array($listeners) ? $listeners : array($listeners))
|
738 |
), 'member'));
|
739 |
|
740 |
+
return $this->authenticate('CreateLoadBalancerListeners', $opt, $this->hostname);
|
741 |
}
|
742 |
}
|
743 |
|
libs/aws/services/emr.class.php
CHANGED
@@ -16,10 +16,14 @@
|
|
16 |
|
17 |
/**
|
18 |
*
|
19 |
-
* This is the Amazon Elastic MapReduce API Reference
|
20 |
-
*
|
21 |
*
|
22 |
-
*
|
|
|
|
|
|
|
|
|
23 |
* @license See the included NOTICE.md file for complete information.
|
24 |
* @copyright See the included NOTICE.md file for complete information.
|
25 |
* @link http://aws.amazon.com/elasticmapreduce/Amazon Elastic MapReduce
|
@@ -95,12 +99,16 @@ class AmazonEMR extends CFRuntime
|
|
95 |
|
96 |
if (!$key && !defined('AWS_KEY'))
|
97 |
{
|
|
|
98 |
throw new EMR_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
|
|
|
99 |
}
|
100 |
|
101 |
if (!$secret_key && !defined('AWS_SECRET_KEY'))
|
102 |
{
|
|
|
103 |
throw new EMR_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
|
|
|
104 |
}
|
105 |
|
106 |
return parent::__construct($key, $secret_key);
|
@@ -111,29 +119,34 @@ class AmazonEMR extends CFRuntime
|
|
111 |
// SERVICE METHODS
|
112 |
|
113 |
/**
|
|
|
114 |
* AddInstanceGroups adds an instance group to a running cluster.
|
115 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
* @param string $job_flow_id (Required) Job flow in which to add the instance groups.
|
117 |
-
* @param array $instance_groups (Required) Instance Groups to add. Takes an indexed array of associative arrays of parameters. Each associative array can have the following keys: <ul>
|
118 |
-
* <li><code>Name</code> - <code>string</code> - Optional - Friendly name given to the instance group.</li>
|
119 |
-
* <li><code>Market</code> - <code>string</code> - Required - Market type of the Amazon EC2 instances used to create a cluster node. [Allowed values: <code>ON_DEMAND</code>]</li>
|
120 |
-
* <li><code>InstanceRole</code> - <code>string</code> - Required - The role of the instance group in the cluster. [Allowed values: <code>MASTER</code>, <code>CORE</code>, <code>TASK</code>]</li>
|
121 |
-
* <li><code>InstanceType</code> - <code>string</code> - Required - The Amazon EC2 instance type for all instances in the instance group.</li>
|
122 |
-
* <li><code>InstanceCount</code> - <code>integer</code> - Required - Target number of instances for the instance group.</li></ul>
|
123 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
124 |
-
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <
|
125 |
-
*
|
126 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
127 |
*/
|
128 |
-
public function add_instance_groups($
|
129 |
{
|
130 |
if (!$opt) $opt = array();
|
131 |
-
$opt['JobFlowId'] = $job_flow_id;
|
132 |
|
133 |
// Required parameter
|
134 |
$opt = array_merge($opt, CFComplexType::map(array(
|
135 |
'InstanceGroups' => (is_array($instance_groups) ? $instance_groups : array($instance_groups))
|
136 |
), 'member'));
|
|
|
137 |
|
138 |
return $this->authenticate('AddInstanceGroups', $opt, $this->hostname);
|
139 |
}
|
@@ -142,6 +155,12 @@ class AmazonEMR extends CFRuntime
|
|
142 |
*
|
143 |
* AddJobFlowSteps adds new steps to a running job flow. A maximum of 256 steps are allowed in each job flow.
|
144 |
*
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
* A step specifies the location of a JAR file stored either on the master node of the job flow or in Amazon S3. Each step is performed by the
|
146 |
* main function of the main class of the JAR file. The main class can be specified either in the manifest of the JAR or by using the
|
147 |
* MainFunction parameter of the step.
|
@@ -149,9 +168,9 @@ class AmazonEMR extends CFRuntime
|
|
149 |
* Elastic MapReduce executes each step in the order listed. For a step to be considered complete, the main function must exit with a zero
|
150 |
* exit code and all Hadoop jobs started while the step was running must have completed and run successfully.
|
151 |
*
|
152 |
-
* You can only add steps to a job flow that is in one of the following states: STARTING,
|
153 |
*
|
154 |
-
* @param string $job_flow_id (Required) A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows
|
155 |
* @param array $steps (Required) A list of StepConfig to be executed by the job flow. <ul>
|
156 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
157 |
* <li><code>Name</code> - <code>string</code> - Required - The name of the job flow step. </li>
|
@@ -170,7 +189,7 @@ class AmazonEMR extends CFRuntime
|
|
170 |
* </ul></li>
|
171 |
* </ul>
|
172 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
173 |
-
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <
|
174 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
175 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
176 |
*/
|
@@ -195,7 +214,7 @@ class AmazonEMR extends CFRuntime
|
|
195 |
*
|
196 |
* @param string|array $job_flow_ids (Required) A list of job flows to be shutdown. Pass a string for a single value, or an indexed array for multiple values.
|
197 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
198 |
-
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <
|
199 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
200 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
201 |
*/
|
@@ -222,8 +241,8 @@ class AmazonEMR extends CFRuntime
|
|
222 |
*
|
223 |
* <ul> <li>Job flows created and completed in the last two weeks</li>
|
224 |
*
|
225 |
-
* <li> Job flows created within the last two months that are in one of the following states: <code>RUNNING</code
|
226 |
-
* <code>SHUTTING_DOWN</code
|
227 |
*
|
228 |
* </ul>
|
229 |
*
|
@@ -234,7 +253,7 @@ class AmazonEMR extends CFRuntime
|
|
234 |
* <li><code>CreatedBefore</code> - <code>string</code> - Optional - Return only job flows created before this date and time. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
|
235 |
* <li><code>JobFlowIds</code> - <code>string|array</code> - Optional - Return only job flows whose job flow ID is contained in this list. Pass a string for a single value, or an indexed array for multiple values. </li>
|
236 |
* <li><code>JobFlowStates</code> - <code>string|array</code> - Optional - Return only job flows whose state is contained in this list. Pass a string for a single value, or an indexed array for multiple values. </li>
|
237 |
-
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <
|
238 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
239 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
240 |
*/
|
@@ -275,16 +294,62 @@ class AmazonEMR extends CFRuntime
|
|
275 |
return $this->authenticate('DescribeJobFlows', $opt, $this->hostname);
|
276 |
}
|
277 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
278 |
/**
|
279 |
*
|
280 |
* RunJobFlow creates and starts running a new job flow. The job flow will run the steps specified. Once the job flow completes, the cluster
|
281 |
* is stopped and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3.
|
282 |
-
* If the JobFlowInstancesDetail
|
283 |
-
* WAITING state rather than shutting down once the steps have completed.
|
|
|
|
|
|
|
284 |
*
|
285 |
* A maximum of 256 steps are allowed in each job flow.
|
286 |
*
|
287 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
288 |
*
|
289 |
* @param string $name (Required) The name of the job flow.
|
290 |
* @param array $instances (Required) A specification of the number and type of Amazon EC2 instances on which to run the job flow. <ul>
|
@@ -294,8 +359,9 @@ class AmazonEMR extends CFRuntime
|
|
294 |
* <li><code>InstanceGroups</code> - <code>array</code> - Optional - Configuration for the job flow's instance groups. <ul>
|
295 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
296 |
* <li><code>Name</code> - <code>string</code> - Optional - Friendly name given to the instance group. </li>
|
297 |
-
* <li><code>Market</code> - <code>string</code> -
|
298 |
* <li><code>InstanceRole</code> - <code>string</code> - Required - The role of the instance group in the cluster. [Allowed values: <code>MASTER</code>, <code>CORE</code>, <code>TASK</code>]</li>
|
|
|
299 |
* <li><code>InstanceType</code> - <code>string</code> - Required - The Amazon EC2 instance type for all instances in the instance group. </li>
|
300 |
* <li><code>InstanceCount</code> - <code>integer</code> - Required - Target number of instances for the instance group. </li>
|
301 |
* </ul></li>
|
@@ -305,6 +371,7 @@ class AmazonEMR extends CFRuntime
|
|
305 |
* <li><code>AvailabilityZone</code> - <code>string</code> - Required - The Amazon EC2 Availability Zone for the job flow. </li>
|
306 |
* </ul></li>
|
307 |
* <li><code>KeepJobFlowAliveWhenNoSteps</code> - <code>boolean</code> - Optional - Specifies whether the job flow should terminate after completing all steps. </li>
|
|
|
308 |
* <li><code>HadoopVersion</code> - <code>string</code> - Optional - Specifies the Hadoop version for the job flow. Valid inputs are "0.18" or "0.20". </li>
|
309 |
* </ul>
|
310 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
@@ -331,12 +398,12 @@ class AmazonEMR extends CFRuntime
|
|
331 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
332 |
* <li><code>Name</code> - <code>string</code> - Required - The name of the bootstrap action. </li>
|
333 |
* <li><code>ScriptBootstrapAction</code> - <code>array</code> - Required - The script run by the bootstrap action. Takes an associative array of parameters that can have the following keys: <ul>
|
334 |
-
* <li><code>Path</code> - <code>string</code> -
|
335 |
* <li><code>Args</code> - <code>string|array</code> - Optional - A list of command line arguments to pass to the bootstrap action script. Pass a string for a single value, or an indexed array for multiple values. </li>
|
336 |
* </ul></li>
|
337 |
* </ul></li>
|
338 |
* </ul></li>
|
339 |
-
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <
|
340 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
341 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
342 |
*/
|
@@ -391,7 +458,7 @@ class AmazonEMR extends CFRuntime
|
|
391 |
* <li><code>InstanceCount</code> - <code>integer</code> - Required - Target size for the instance group. </li>
|
392 |
* </ul></li>
|
393 |
* </ul></li>
|
394 |
-
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <
|
395 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
396 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
397 |
*/
|
16 |
|
17 |
/**
|
18 |
*
|
19 |
+
* This is the <i>Amazon Elastic MapReduce API Reference</i>. This guide provides descriptions and samples of the Amazon Elastic MapReduce
|
20 |
+
* APIs.
|
21 |
*
|
22 |
+
* Amazon Elastic MapReduce is a web service that makes it easy to process large amounts of data efficiently. Elastic MapReduce uses Hadoop
|
23 |
+
* processing combined with several AWS products to do tasks such as web indexing, data mining, log file analysis, machine learning, scientific
|
24 |
+
* simulation, and data warehousing.
|
25 |
+
*
|
26 |
+
* @version Thu Sep 01 21:21:27 PDT 2011
|
27 |
* @license See the included NOTICE.md file for complete information.
|
28 |
* @copyright See the included NOTICE.md file for complete information.
|
29 |
* @link http://aws.amazon.com/elasticmapreduce/Amazon Elastic MapReduce
|
99 |
|
100 |
if (!$key && !defined('AWS_KEY'))
|
101 |
{
|
102 |
+
// @codeCoverageIgnoreStart
|
103 |
throw new EMR_Exception('No account key was passed into the constructor, nor was it set in the AWS_KEY constant.');
|
104 |
+
// @codeCoverageIgnoreEnd
|
105 |
}
|
106 |
|
107 |
if (!$secret_key && !defined('AWS_SECRET_KEY'))
|
108 |
{
|
109 |
+
// @codeCoverageIgnoreStart
|
110 |
throw new EMR_Exception('No account secret was passed into the constructor, nor was it set in the AWS_SECRET_KEY constant.');
|
111 |
+
// @codeCoverageIgnoreEnd
|
112 |
}
|
113 |
|
114 |
return parent::__construct($key, $secret_key);
|
119 |
// SERVICE METHODS
|
120 |
|
121 |
/**
|
122 |
+
*
|
123 |
* AddInstanceGroups adds an instance group to a running cluster.
|
124 |
*
|
125 |
+
* @param array $instance_groups (Required) Instance Groups to add. <ul>
|
126 |
+
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
127 |
+
* <li><code>Name</code> - <code>string</code> - Optional - Friendly name given to the instance group. </li>
|
128 |
+
* <li><code>Market</code> - <code>string</code> - Optional - Market type of the Amazon EC2 instances used to create a cluster node. [Allowed values: <code>ON_DEMAND</code>, <code>SPOT</code>]</li>
|
129 |
+
* <li><code>InstanceRole</code> - <code>string</code> - Required - The role of the instance group in the cluster. [Allowed values: <code>MASTER</code>, <code>CORE</code>, <code>TASK</code>]</li>
|
130 |
+
* <li><code>BidPrice</code> - <code>string</code> - Optional - Bid price for each Amazon EC2 instance in the instance group when launching nodes as Spot Instances, expressed in USD. </li>
|
131 |
+
* <li><code>InstanceType</code> - <code>string</code> - Required - The Amazon EC2 instance type for all instances in the instance group. </li>
|
132 |
+
* <li><code>InstanceCount</code> - <code>integer</code> - Required - Target number of instances for the instance group. </li>
|
133 |
+
* </ul></li>
|
134 |
+
* </ul>
|
135 |
* @param string $job_flow_id (Required) Job flow in which to add the instance groups.
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
137 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
138 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
139 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
140 |
*/
|
141 |
+
public function add_instance_groups($instance_groups, $job_flow_id, $opt = null)
|
142 |
{
|
143 |
if (!$opt) $opt = array();
|
|
|
144 |
|
145 |
// Required parameter
|
146 |
$opt = array_merge($opt, CFComplexType::map(array(
|
147 |
'InstanceGroups' => (is_array($instance_groups) ? $instance_groups : array($instance_groups))
|
148 |
), 'member'));
|
149 |
+
$opt['JobFlowId'] = $job_flow_id;
|
150 |
|
151 |
return $this->authenticate('AddInstanceGroups', $opt, $this->hostname);
|
152 |
}
|
155 |
*
|
156 |
* AddJobFlowSteps adds new steps to a running job flow. A maximum of 256 steps are allowed in each job flow.
|
157 |
*
|
158 |
+
* If your job flow is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You
|
159 |
+
* can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries
|
160 |
+
* directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, go to <a
|
161 |
+
* href="http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/AddMoreThan256Steps.html">Add More than 256 Steps to a Job
|
162 |
+
* Flow</a> in the <i>Amazon Elastic MapReduce Developer's Guide</i>.
|
163 |
+
*
|
164 |
* A step specifies the location of a JAR file stored either on the master node of the job flow or in Amazon S3. Each step is performed by the
|
165 |
* main function of the main class of the JAR file. The main class can be specified either in the manifest of the JAR or by using the
|
166 |
* MainFunction parameter of the step.
|
168 |
* Elastic MapReduce executes each step in the order listed. For a step to be considered complete, the main function must exit with a zero
|
169 |
* exit code and all Hadoop jobs started while the step was running must have completed and run successfully.
|
170 |
*
|
171 |
+
* You can only add steps to a job flow that is in one of the following states: STARTING, BOOTSTRAPPING, RUNNING, or WAITING.
|
172 |
*
|
173 |
+
* @param string $job_flow_id (Required) A string that uniquely identifies the job flow. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows.
|
174 |
* @param array $steps (Required) A list of StepConfig to be executed by the job flow. <ul>
|
175 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
176 |
* <li><code>Name</code> - <code>string</code> - Required - The name of the job flow step. </li>
|
189 |
* </ul></li>
|
190 |
* </ul>
|
191 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
192 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
193 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
194 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
195 |
*/
|
214 |
*
|
215 |
* @param string|array $job_flow_ids (Required) A list of job flows to be shutdown. Pass a string for a single value, or an indexed array for multiple values.
|
216 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
217 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
218 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
219 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
220 |
*/
|
241 |
*
|
242 |
* <ul> <li>Job flows created and completed in the last two weeks</li>
|
243 |
*
|
244 |
+
* <li> Job flows created within the last two months that are in one of the following states: <code>RUNNING</code>, <code>WAITING</code>,
|
245 |
+
* <code>SHUTTING_DOWN</code>, <code>STARTING</code> </li>
|
246 |
*
|
247 |
* </ul>
|
248 |
*
|
253 |
* <li><code>CreatedBefore</code> - <code>string</code> - Optional - Return only job flows created before this date and time. May be passed as a number of seconds since UNIX Epoch, or any string compatible with <php:strtotime()>.</li>
|
254 |
* <li><code>JobFlowIds</code> - <code>string|array</code> - Optional - Return only job flows whose job flow ID is contained in this list. Pass a string for a single value, or an indexed array for multiple values. </li>
|
255 |
* <li><code>JobFlowStates</code> - <code>string|array</code> - Optional - Return only job flows whose state is contained in this list. Pass a string for a single value, or an indexed array for multiple values. </li>
|
256 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
257 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
258 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
259 |
*/
|
294 |
return $this->authenticate('DescribeJobFlows', $opt, $this->hostname);
|
295 |
}
|
296 |
|
297 |
+
/**
|
298 |
+
*
|
299 |
+
* SetTerminationProtection locks a job flow so the Amazon EC2 instances in the cluster cannot be terminated by user intervention, an API
|
300 |
+
* call, or in the event of a job-flow error. The cluster still terminates upon successful completion of the job flow. Calling
|
301 |
+
* SetTerminationProtection on a job flow is analogous to calling the Amazon EC2 DisableAPITermination API on all of the EC2 instances in a
|
302 |
+
* cluster.
|
303 |
+
*
|
304 |
+
* SetTerminationProtection is used to prevent accidental termination of a job flow and to ensure that in the event of an error, the instances
|
305 |
+
* will persist so you can recover any data stored in their ephemeral instance storage.
|
306 |
+
*
|
307 |
+
* To terminate a job flow that has been locked by setting SetTerminationProtection to <code>true</code>, you must first unlock the job flow
|
308 |
+
* by a subsequent call to SetTerminationProtection in which you set the value to <code>false</code>.
|
309 |
+
*
|
310 |
+
* For more information, go to <a
|
311 |
+
* href="http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/UsingEMR_TerminationProtection.html">Protecting a Job Flow
|
312 |
+
* from Termination</a> in the <i>Amazon Elastic MapReduce Developer's Guide.</i>
|
313 |
+
*
|
314 |
+
* @param string|array $job_flow_ids (Required) A list of strings that uniquely identify the job flows to protect. This identifier is returned by RunJobFlow and can also be obtained from DescribeJobFlows . Pass a string for a single value, or an indexed array for multiple values.
|
315 |
+
* @param boolean $termination_protected (Required) A Boolean that indicates whether to protect the job flow and prevent the Amazon EC2 instances in the cluster from shutting down due to API calls, user intervention, or job-flow error.
|
316 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
317 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
318 |
+
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
319 |
+
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
320 |
+
*/
|
321 |
+
public function set_termination_protection($job_flow_ids, $termination_protected, $opt = null)
|
322 |
+
{
|
323 |
+
if (!$opt) $opt = array();
|
324 |
+
|
325 |
+
// Required parameter
|
326 |
+
$opt = array_merge($opt, CFComplexType::map(array(
|
327 |
+
'JobFlowIds' => (is_array($job_flow_ids) ? $job_flow_ids : array($job_flow_ids))
|
328 |
+
), 'member'));
|
329 |
+
$opt['TerminationProtected'] = $termination_protected;
|
330 |
+
|
331 |
+
return $this->authenticate('SetTerminationProtection', $opt, $this->hostname);
|
332 |
+
}
|
333 |
+
|
334 |
/**
|
335 |
*
|
336 |
* RunJobFlow creates and starts running a new job flow. The job flow will run the steps specified. Once the job flow completes, the cluster
|
337 |
* is stopped and the HDFS partition is lost. To prevent loss of data, configure the last step of the job flow to store results in Amazon S3.
|
338 |
+
* If the JobFlowInstancesDetail <code>KeepJobFlowAliveWhenNoSteps</code> parameter is set to <code>TRUE</code>, the job flow will transition
|
339 |
+
* to the WAITING state rather than shutting down once the steps have completed.
|
340 |
+
*
|
341 |
+
* For additional protection, you can set the JobFlowInstancesDetail <code>TerminationProtected</code> parameter to <code>TRUE</code> to lock
|
342 |
+
* the job flow and prevent it from being terminated by API call, user intervention, or in the event of a job flow error.
|
343 |
*
|
344 |
* A maximum of 256 steps are allowed in each job flow.
|
345 |
*
|
346 |
+
* If your job flow is long-running (such as a Hive data warehouse) or complex, you may require more than 256 steps to process your data. You
|
347 |
+
* can bypass the 256-step limitation in various ways, including using the SSH shell to connect to the master node and submitting queries
|
348 |
+
* directly to the software running on the master node, such as Hive and Hadoop. For more information on how to do this, go to <a
|
349 |
+
* href="http://docs.amazonwebservices.com/ElasticMapReduce/latest/DeveloperGuide/AddMoreThan256Steps.html">Add More than 256 Steps to a Job
|
350 |
+
* Flow</a> in the <i>Amazon Elastic MapReduce Developer's Guide</i>.
|
351 |
+
*
|
352 |
+
* For long running job flows, we recommend that you periodically store your results.
|
353 |
*
|
354 |
* @param string $name (Required) The name of the job flow.
|
355 |
* @param array $instances (Required) A specification of the number and type of Amazon EC2 instances on which to run the job flow. <ul>
|
359 |
* <li><code>InstanceGroups</code> - <code>array</code> - Optional - Configuration for the job flow's instance groups. <ul>
|
360 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
361 |
* <li><code>Name</code> - <code>string</code> - Optional - Friendly name given to the instance group. </li>
|
362 |
+
* <li><code>Market</code> - <code>string</code> - Optional - Market type of the Amazon EC2 instances used to create a cluster node. [Allowed values: <code>ON_DEMAND</code>, <code>SPOT</code>]</li>
|
363 |
* <li><code>InstanceRole</code> - <code>string</code> - Required - The role of the instance group in the cluster. [Allowed values: <code>MASTER</code>, <code>CORE</code>, <code>TASK</code>]</li>
|
364 |
+
* <li><code>BidPrice</code> - <code>string</code> - Optional - Bid price for each Amazon EC2 instance in the instance group when launching nodes as Spot Instances, expressed in USD. </li>
|
365 |
* <li><code>InstanceType</code> - <code>string</code> - Required - The Amazon EC2 instance type for all instances in the instance group. </li>
|
366 |
* <li><code>InstanceCount</code> - <code>integer</code> - Required - Target number of instances for the instance group. </li>
|
367 |
* </ul></li>
|
371 |
* <li><code>AvailabilityZone</code> - <code>string</code> - Required - The Amazon EC2 Availability Zone for the job flow. </li>
|
372 |
* </ul></li>
|
373 |
* <li><code>KeepJobFlowAliveWhenNoSteps</code> - <code>boolean</code> - Optional - Specifies whether the job flow should terminate after completing all steps. </li>
|
374 |
+
* <li><code>TerminationProtected</code> - <code>boolean</code> - Optional - Specifies whether to lock the job flow to prevent the Amazon EC2 instances from being terminated by API call, user intervention, or in the event of a job flow error. </li>
|
375 |
* <li><code>HadoopVersion</code> - <code>string</code> - Optional - Specifies the Hadoop version for the job flow. Valid inputs are "0.18" or "0.20". </li>
|
376 |
* </ul>
|
377 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
398 |
* <li><code>x</code> - <code>array</code> - This represents a simple array index. <ul>
|
399 |
* <li><code>Name</code> - <code>string</code> - Required - The name of the bootstrap action. </li>
|
400 |
* <li><code>ScriptBootstrapAction</code> - <code>array</code> - Required - The script run by the bootstrap action. Takes an associative array of parameters that can have the following keys: <ul>
|
401 |
+
* <li><code>Path</code> - <code>string</code> - Required - Location of the script to run during a bootstrap action. Can be either a location in Amazon S3 or on a local file system. </li>
|
402 |
* <li><code>Args</code> - <code>string|array</code> - Optional - A list of command line arguments to pass to the bootstrap action script. Pass a string for a single value, or an indexed array for multiple values. </li>
|
403 |
* </ul></li>
|
404 |
* </ul></li>
|
405 |
* </ul></li>
|
406 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
407 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
408 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
409 |
*/
|
458 |
* <li><code>InstanceCount</code> - <code>integer</code> - Required - Target size for the instance group. </li>
|
459 |
* </ul></li>
|
460 |
* </ul></li>
|
461 |
+
* <li><code>curlopts</code> - <code>array</code> - Optional - A set of values to pass directly into <code>curl_setopt()</code>, where the key is a pre-defined <code>CURLOPT_*</code> constant.</li>
|
462 |
* <li><code>returnCurlHandle</code> - <code>boolean</code> - Optional - A private toggle specifying that the cURL handle be returned rather than actually completing the request. This toggle is useful for manually managed batch requests.</li></ul>
|
463 |
* @return CFResponse A <CFResponse> object containing a parsed HTTP response.
|
464 |
*/
|
libs/aws/services/iam.class.php
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
*
|
33 |
* We will refer to Amazon AWS Identity and Access Management using the abbreviated form IAM. All copyrights and legal protections still apply.
|
34 |
*
|
35 |
-
* @version
|
36 |
* @license See the included NOTICE.md file for complete information.
|
37 |
* @copyright See the included NOTICE.md file for complete information.
|
38 |
* @link http://aws.amazon.com/iam/Amazon Identity and Access Management Service
|
32 |
*
|
33 |
* We will refer to Amazon AWS Identity and Access Management using the abbreviated form IAM. All copyrights and legal protections still apply.
|
34 |
*
|
35 |
+
* @version Thu Sep 01 21:21:56 PDT 2011
|
36 |
* @license See the included NOTICE.md file for complete information.
|
37 |
* @copyright See the included NOTICE.md file for complete information.
|
38 |
* @link http://aws.amazon.com/iam/Amazon Identity and Access Management Service
|
libs/aws/services/importexport.class.php
CHANGED
@@ -22,7 +22,7 @@
|
|
22 |
* Internet. For large data sets, AWS Import/Export is often faster than Internet transfer and more cost effective than upgrading your
|
23 |
* connectivity.
|
24 |
*
|
25 |
-
* @version
|
26 |
* @license See the included NOTICE.md file for complete information.
|
27 |
* @copyright See the included NOTICE.md file for complete information.
|
28 |
* @link http://aws.amazon.com/importexport/Amazon Import/Export Service
|
22 |
* Internet. For large data sets, AWS Import/Export is often faster than Internet transfer and more cost effective than upgrading your
|
23 |
* connectivity.
|
24 |
*
|
25 |
+
* @version Thu Sep 01 21:22:26 PDT 2011
|
26 |
* @license See the included NOTICE.md file for complete information.
|
27 |
* @copyright See the included NOTICE.md file for complete information.
|
28 |
* @link http://aws.amazon.com/importexport/Amazon Import/Export Service
|
libs/aws/services/rds.class.php
CHANGED
@@ -27,7 +27,7 @@
|
|
27 |
* instance's compute resources and storage capacity to meet your application's demand. As with all Amazon Web Services, there are no up-front
|
28 |
* investments, and you pay only for the resources you use.
|
29 |
*
|
30 |
-
* @version
|
31 |
* @license See the included NOTICE.md file for complete information.
|
32 |
* @copyright See the included NOTICE.md file for complete information.
|
33 |
* @link http://aws.amazon.com/rds/Amazon Relational Database Service
|
27 |
* instance's compute resources and storage capacity to meet your application's demand. As with all Amazon Web Services, there are no up-front
|
28 |
* investments, and you pay only for the resources you use.
|
29 |
*
|
30 |
+
* @version Thu Sep 01 21:22:55 PDT 2011
|
31 |
* @license See the included NOTICE.md file for complete information.
|
32 |
* @copyright See the included NOTICE.md file for complete information.
|
33 |
* @link http://aws.amazon.com/rds/Amazon Relational Database Service
|
libs/aws/services/s3.class.php
CHANGED
@@ -287,7 +287,7 @@ class AmazonS3 extends CFRuntime
|
|
287 |
return parent::session_based_auth($key, $secret_key, $token);
|
288 |
}
|
289 |
|
290 |
-
return parent::__construct($key, $secret_key);
|
291 |
}
|
292 |
|
293 |
|
@@ -1169,6 +1169,8 @@ class AmazonS3 extends CFRuntime
|
|
1169 |
* <li><code>fileUpload</code> - <code>string|resource</code> - Required; Conditional - The URL/path for the file to upload, or an open resource. Either this parameter or <code>body</code> is required.</li>
|
1170 |
* <li><code>acl</code> - <code>string</code> - Optional - The ACL settings for the specified object. [Allowed values: <code>AmazonS3::ACL_PRIVATE</code>, <code>AmazonS3::ACL_PUBLIC</code>, <code>AmazonS3::ACL_OPEN</code>, <code>AmazonS3::ACL_AUTH_READ</code>, <code>AmazonS3::ACL_OWNER_READ</code>, <code>AmazonS3::ACL_OWNER_FULL_CONTROL</code>]. The default value is <code>ACL_PRIVATE</code>.</li>
|
1171 |
* <li><code>contentType</code> - <code>string</code> - Optional - The type of content that is being sent in the body. If a file is being uploaded via <code>fileUpload</code> as a file system path, it will attempt to determine the correct mime-type based on the file extension. The default value is <code>application/octet-stream</code>.</li>
|
|
|
|
|
1172 |
* <li><code>headers</code> - <code>array</code> - Optional - The standard HTTP headers to send along in the request.</li>
|
1173 |
* <li><code>length</code> - <code>integer</code> - Optional - The size of the object in bytes. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13">RFC 2616, section 14.13</a>. The value can also be passed to the <code>header</code> option as <code>Content-Length</code>.</li>
|
1174 |
* <li><code>meta</code> - <code>array</code> - Optional - An associative array of key-value pairs. Represented by <code>x-amz-meta-:</code>. Any header starting with this prefix is considered user metadata. It will be stored with the object and returned when you retrieve the object. The total size of the HTTP request, not including the body, must be less than 4 KB.</li>
|
@@ -1215,6 +1217,13 @@ class AmazonS3 extends CFRuntime
|
|
1215 |
unset($opt['storage']);
|
1216 |
}
|
1217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1218 |
// Handle meta tags. Can also be passed as an HTTP header.
|
1219 |
if (isset($opt['meta']))
|
1220 |
{
|
@@ -1394,6 +1403,7 @@ class AmazonS3 extends CFRuntime
|
|
1394 |
* <li><code>filename</code> - <code>string</code> - Required - Specifies the file name to copy the object to.</li></ul>
|
1395 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
1396 |
* <li><code>acl</code> - <code>string</code> - Optional - The ACL settings for the specified object. [Allowed values: <code>AmazonS3::ACL_PRIVATE</code>, <code>AmazonS3::ACL_PUBLIC</code>, <code>AmazonS3::ACL_OPEN</code>, <code>AmazonS3::ACL_AUTH_READ</code>, <code>AmazonS3::ACL_OWNER_READ</code>, <code>AmazonS3::ACL_OWNER_FULL_CONTROL</code>]. Alternatively, an array of associative arrays. Each associative array contains an <code>id</code> and a <code>permission</code> key. The default value is <code>ACL_PRIVATE</code>.</li>
|
|
|
1397 |
* <li><code>storage</code> - <code>string</code> - Optional - Whether to use Standard or Reduced Redundancy storage. [Allowed values: <code>AmazonS3::STORAGE_STANDARD</code>, <code>AmazonS3::STORAGE_REDUCED</code>]. The default value is <code>STORAGE_STANDARD</code>.</li>
|
1398 |
* <li><code>versionId</code> - <code>string</code> - Optional - The version of the object to copy. Version IDs are returned in the <code>x-amz-version-id</code> header of any previous object-related request.</li>
|
1399 |
* <li><code>ifMatch</code> - <code>string</code> - Optional - The ETag header from a previous request. Copies the object if its entity tag (ETag) matches the specified tag; otherwise, the request returns a <code>412</code> HTTP status code error (precondition failed). Used in conjunction with <code>ifUnmodifiedSince</code>.</li>
|
@@ -1472,6 +1482,13 @@ class AmazonS3 extends CFRuntime
|
|
1472 |
unset($opt['storage']);
|
1473 |
}
|
1474 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1475 |
// Handle conditional-copy parameters
|
1476 |
if (isset($opt['ifMatch']))
|
1477 |
{
|
@@ -2801,6 +2818,7 @@ class AmazonS3 extends CFRuntime
|
|
2801 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
2802 |
* <li><code>acl</code> - <code>string</code> - Optional - The ACL settings for the specified object. [Allowed values: <code>AmazonS3::ACL_PRIVATE</code>, <code>AmazonS3::ACL_PUBLIC</code>, <code>AmazonS3::ACL_OPEN</code>, <code>AmazonS3::ACL_AUTH_READ</code>, <code>AmazonS3::ACL_OWNER_READ</code>, <code>AmazonS3::ACL_OWNER_FULL_CONTROL</code>]. The default value is <code>ACL_PRIVATE</code>.</li>
|
2803 |
* <li><code>contentType</code> - <code>string</code> - Optional - The type of content that is being sent. The default value is <code>application/octet-stream</code>.</li>
|
|
|
2804 |
* <li><code>headers</code> - <code>array</code> - Optional - The standard HTTP headers to send along in the request.</li>
|
2805 |
* <li><code>meta</code> - <code>array</code> - Optional - An associative array of key-value pairs. Any header starting with <code>x-amz-meta-:</code> is considered user metadata. It will be stored with the object and returned when you retrieve the object. The total size of the HTTP request, not including the body, must be less than 4 KB.</li>
|
2806 |
* <li><code>storage</code> - <code>string</code> - Optional - Whether to use Standard or Reduced Redundancy storage. [Allowed values: <code>AmazonS3::STORAGE_STANDARD</code>, <code>AmazonS3::STORAGE_REDUCED</code>]. The default value is <code>STORAGE_STANDARD</code>.</li>
|
@@ -2846,6 +2864,13 @@ class AmazonS3 extends CFRuntime
|
|
2846 |
unset($opt['storage']);
|
2847 |
}
|
2848 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2849 |
// Handle meta tags. Can also be passed as an HTTP header.
|
2850 |
if (isset($opt['meta']))
|
2851 |
{
|
287 |
return parent::session_based_auth($key, $secret_key, $token);
|
288 |
}
|
289 |
|
290 |
+
return parent::__construct($key, $secret_key, $token);
|
291 |
}
|
292 |
|
293 |
|
1169 |
* <li><code>fileUpload</code> - <code>string|resource</code> - Required; Conditional - The URL/path for the file to upload, or an open resource. Either this parameter or <code>body</code> is required.</li>
|
1170 |
* <li><code>acl</code> - <code>string</code> - Optional - The ACL settings for the specified object. [Allowed values: <code>AmazonS3::ACL_PRIVATE</code>, <code>AmazonS3::ACL_PUBLIC</code>, <code>AmazonS3::ACL_OPEN</code>, <code>AmazonS3::ACL_AUTH_READ</code>, <code>AmazonS3::ACL_OWNER_READ</code>, <code>AmazonS3::ACL_OWNER_FULL_CONTROL</code>]. The default value is <code>ACL_PRIVATE</code>.</li>
|
1171 |
* <li><code>contentType</code> - <code>string</code> - Optional - The type of content that is being sent in the body. If a file is being uploaded via <code>fileUpload</code> as a file system path, it will attempt to determine the correct mime-type based on the file extension. The default value is <code>application/octet-stream</code>.</li>
|
1172 |
+
* <li><code>contentType</code> - <code>string</code> - Optional - The type of content that is being sent in the body. If a file is being uploaded via <code>fileUpload</code> as a file system path, it will attempt to determine the correct mime-type based on the file extension. The default value is <code>application/octet-stream</code>.</li>
|
1173 |
+
* <li><code>encryption</code> - <code>string</code> - Optional - The algorithm to use for encrypting the object. [Allowed values: <code>AES256</code>]</li>
|
1174 |
* <li><code>headers</code> - <code>array</code> - Optional - The standard HTTP headers to send along in the request.</li>
|
1175 |
* <li><code>length</code> - <code>integer</code> - Optional - The size of the object in bytes. For more information, see <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.13">RFC 2616, section 14.13</a>. The value can also be passed to the <code>header</code> option as <code>Content-Length</code>.</li>
|
1176 |
* <li><code>meta</code> - <code>array</code> - Optional - An associative array of key-value pairs. Represented by <code>x-amz-meta-:</code>. Any header starting with this prefix is considered user metadata. It will be stored with the object and returned when you retrieve the object. The total size of the HTTP request, not including the body, must be less than 4 KB.</li>
|
1217 |
unset($opt['storage']);
|
1218 |
}
|
1219 |
|
1220 |
+
// Handle encryption settings. Can also be passed as an HTTP header.
|
1221 |
+
if (isset($opt['encryption']))
|
1222 |
+
{
|
1223 |
+
$opt['headers']['x-amz-server-side-encryption'] = $opt['encryption'];
|
1224 |
+
unset($opt['encryption']);
|
1225 |
+
}
|
1226 |
+
|
1227 |
// Handle meta tags. Can also be passed as an HTTP header.
|
1228 |
if (isset($opt['meta']))
|
1229 |
{
|
1403 |
* <li><code>filename</code> - <code>string</code> - Required - Specifies the file name to copy the object to.</li></ul>
|
1404 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
1405 |
* <li><code>acl</code> - <code>string</code> - Optional - The ACL settings for the specified object. [Allowed values: <code>AmazonS3::ACL_PRIVATE</code>, <code>AmazonS3::ACL_PUBLIC</code>, <code>AmazonS3::ACL_OPEN</code>, <code>AmazonS3::ACL_AUTH_READ</code>, <code>AmazonS3::ACL_OWNER_READ</code>, <code>AmazonS3::ACL_OWNER_FULL_CONTROL</code>]. Alternatively, an array of associative arrays. Each associative array contains an <code>id</code> and a <code>permission</code> key. The default value is <code>ACL_PRIVATE</code>.</li>
|
1406 |
+
* <li><code>encryption</code> - <code>string</code> - Optional - The algorithm to use for encrypting the object. [Allowed values: <code>AES256</code>]</li>
|
1407 |
* <li><code>storage</code> - <code>string</code> - Optional - Whether to use Standard or Reduced Redundancy storage. [Allowed values: <code>AmazonS3::STORAGE_STANDARD</code>, <code>AmazonS3::STORAGE_REDUCED</code>]. The default value is <code>STORAGE_STANDARD</code>.</li>
|
1408 |
* <li><code>versionId</code> - <code>string</code> - Optional - The version of the object to copy. Version IDs are returned in the <code>x-amz-version-id</code> header of any previous object-related request.</li>
|
1409 |
* <li><code>ifMatch</code> - <code>string</code> - Optional - The ETag header from a previous request. Copies the object if its entity tag (ETag) matches the specified tag; otherwise, the request returns a <code>412</code> HTTP status code error (precondition failed). Used in conjunction with <code>ifUnmodifiedSince</code>.</li>
|
1482 |
unset($opt['storage']);
|
1483 |
}
|
1484 |
|
1485 |
+
// Handle encryption settings. Can also be passed as an HTTP header.
|
1486 |
+
if (isset($opt['encryption']))
|
1487 |
+
{
|
1488 |
+
$opt['headers']['x-amz-server-side-encryption'] = $opt['encryption'];
|
1489 |
+
unset($opt['encryption']);
|
1490 |
+
}
|
1491 |
+
|
1492 |
// Handle conditional-copy parameters
|
1493 |
if (isset($opt['ifMatch']))
|
1494 |
{
|
2818 |
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
2819 |
* <li><code>acl</code> - <code>string</code> - Optional - The ACL settings for the specified object. [Allowed values: <code>AmazonS3::ACL_PRIVATE</code>, <code>AmazonS3::ACL_PUBLIC</code>, <code>AmazonS3::ACL_OPEN</code>, <code>AmazonS3::ACL_AUTH_READ</code>, <code>AmazonS3::ACL_OWNER_READ</code>, <code>AmazonS3::ACL_OWNER_FULL_CONTROL</code>]. The default value is <code>ACL_PRIVATE</code>.</li>
|
2820 |
* <li><code>contentType</code> - <code>string</code> - Optional - The type of content that is being sent. The default value is <code>application/octet-stream</code>.</li>
|
2821 |
+
* <li><code>encryption</code> - <code>string</code> - Optional - The algorithm to use for encrypting the object. [Allowed values: <code>AES256</code>]</li>
|
2822 |
* <li><code>headers</code> - <code>array</code> - Optional - The standard HTTP headers to send along in the request.</li>
|
2823 |
* <li><code>meta</code> - <code>array</code> - Optional - An associative array of key-value pairs. Any header starting with <code>x-amz-meta-:</code> is considered user metadata. It will be stored with the object and returned when you retrieve the object. The total size of the HTTP request, not including the body, must be less than 4 KB.</li>
|
2824 |
* <li><code>storage</code> - <code>string</code> - Optional - Whether to use Standard or Reduced Redundancy storage. [Allowed values: <code>AmazonS3::STORAGE_STANDARD</code>, <code>AmazonS3::STORAGE_REDUCED</code>]. The default value is <code>STORAGE_STANDARD</code>.</li>
|
2864 |
unset($opt['storage']);
|
2865 |
}
|
2866 |
|
2867 |
+
// Handle encryption settings. Can also be passed as an HTTP header.
|
2868 |
+
if (isset($opt['encryption']))
|
2869 |
+
{
|
2870 |
+
$opt['headers']['x-amz-server-side-encryption'] = $opt['encryption'];
|
2871 |
+
unset($opt['encryption']);
|
2872 |
+
}
|
2873 |
+
|
2874 |
// Handle meta tags. Can also be passed as an HTTP header.
|
2875 |
if (isset($opt['meta']))
|
2876 |
{
|
libs/aws/services/ses.class.php
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
* For specific details on how to construct a service request, please consult the <a
|
24 |
* href="http://docs.amazonwebservices.com/ses/latest/DeveloperGuide">Amazon SES Developer Guide</a>.
|
25 |
*
|
26 |
-
* @version
|
27 |
* @license See the included NOTICE.md file for complete information.
|
28 |
* @copyright See the included NOTICE.md file for complete information.
|
29 |
* @link http://aws.amazon.com/ses/Amazon Simple Email Service
|
23 |
* For specific details on how to construct a service request, please consult the <a
|
24 |
* href="http://docs.amazonwebservices.com/ses/latest/DeveloperGuide">Amazon SES Developer Guide</a>.
|
25 |
*
|
26 |
+
* @version Thu Sep 01 21:20:58 PDT 2011
|
27 |
* @license See the included NOTICE.md file for complete information.
|
28 |
* @copyright See the included NOTICE.md file for complete information.
|
29 |
* @link http://aws.amazon.com/ses/Amazon Simple Email Service
|
libs/aws/services/sns.class.php
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
/**
|
18 |
|
19 |
*
|
20 |
-
* @version
|
21 |
* @license See the included NOTICE.md file for complete information.
|
22 |
* @copyright See the included NOTICE.md file for complete information.
|
23 |
* @link http://aws.amazon.com/sns/Amazon Simple Notification Service
|
17 |
/**
|
18 |
|
19 |
*
|
20 |
+
* @version Thu Sep 01 21:23:56 PDT 2011
|
21 |
* @license See the included NOTICE.md file for complete information.
|
22 |
* @copyright See the included NOTICE.md file for complete information.
|
23 |
* @link http://aws.amazon.com/sns/Amazon Simple Notification Service
|
libs/aws/services/sqs.class.php
CHANGED
@@ -28,7 +28,7 @@
|
|
28 |
*
|
29 |
* Visit <a href="http://aws.amazon.com/sqs/">http://aws.amazon.com/sqs/</a> for more information.
|
30 |
*
|
31 |
-
* @version
|
32 |
* @license See the included NOTICE.md file for complete information.
|
33 |
* @copyright See the included NOTICE.md file for complete information.
|
34 |
* @link http://aws.amazon.com/sqs/Amazon Simple Queue Service
|
28 |
*
|
29 |
* Visit <a href="http://aws.amazon.com/sqs/">http://aws.amazon.com/sqs/</a> for more information.
|
30 |
*
|
31 |
+
* @version Thu Sep 01 21:24:22 PDT 2011
|
32 |
* @license See the included NOTICE.md file for complete information.
|
33 |
* @copyright See the included NOTICE.md file for complete information.
|
34 |
* @link http://aws.amazon.com/sqs/Amazon Simple Queue Service
|
libs/aws/services/sts.class.php
CHANGED
@@ -35,7 +35,7 @@
|
|
35 |
* We will refer to Amazon AWS Security Token Service using the abbreviated form STS, and to Amazon Identity and Access Management using the
|
36 |
* abbreviated form IAM. All copyrights and legal protections still apply.
|
37 |
*
|
38 |
-
* @version
|
39 |
* @license See the included NOTICE.md file for complete information.
|
40 |
* @copyright See the included NOTICE.md file for complete information.
|
41 |
* @link http://aws.amazon.com/sts/AWS Secure Token Service
|
35 |
* We will refer to Amazon AWS Security Token Service using the abbreviated form STS, and to Amazon Identity and Access Management using the
|
36 |
* abbreviated form IAM. All copyrights and legal protections still apply.
|
37 |
*
|
38 |
+
* @version Thu Sep 01 21:24:44 PDT 2011
|
39 |
* @license See the included NOTICE.md file for complete information.
|
40 |
* @copyright See the included NOTICE.md file for complete information.
|
41 |
* @link http://aws.amazon.com/sts/AWS Secure Token Service
|
libs/aws/utilities/hadoopbootstrap.class.php
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
* Copyright 2010-2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
4 |
+
*
|
5 |
+
* Licensed under the Apache License, Version 2.0 (the "License").
|
6 |
+
* You may not use this file except in compliance with the License.
|
7 |
+
* A copy of the License is located at
|
8 |
+
*
|
9 |
+
* http://aws.amazon.com/apache2.0
|
10 |
+
*
|
11 |
+
* or in the "license" file accompanying this file. This file is distributed
|
12 |
+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
13 |
+
* express or implied. See the License for the specific language governing
|
14 |
+
* permissions and limitations under the License.
|
15 |
+
*/
|
16 |
+
|
17 |
+
|
18 |
+
/*%******************************************************************************************%*/
|
19 |
+
// CLASS
|
20 |
+
|
21 |
+
/**
|
22 |
+
* Contains a set of pre-built Amazon EMR Hadoop Bootstrap Actions.
|
23 |
+
*
|
24 |
+
* @version 2011.05.03
|
25 |
+
* @license See the included NOTICE.md file for more information.
|
26 |
+
* @copyright See the included NOTICE.md file for more information.
|
27 |
+
* @link http://aws.amazon.com/php/ PHP Developer Center
|
28 |
+
* @link http://hadoop.apache.org Apache Hadoop
|
29 |
+
*/
|
30 |
+
class CFHadoopBootstrap extends CFHadoopBase
|
31 |
+
{
|
32 |
+
// Config file types
|
33 |
+
const CONFIG_SITE = 'S';
|
34 |
+
const CONFIG_DEFAULT = 'D';
|
35 |
+
const CONFIG_CORE = 'C';
|
36 |
+
const CONFIG_HDFS = 'H';
|
37 |
+
const CONFIG_MAPREDUCE = 'M';
|
38 |
+
|
39 |
+
// Daemon types
|
40 |
+
const DAEMON_NAME_NODE = 'namenode';
|
41 |
+
const DAEMON_DATA_NODE = 'datanode';
|
42 |
+
const DAEMON_JOB_TRACKER = 'jobtracker';
|
43 |
+
const DAEMON_TASK_TRACKER = 'tasktracker';
|
44 |
+
const DAEMON_CLIENT = 'client';
|
45 |
+
|
46 |
+
/**
|
47 |
+
* Create a new run-if bootstrap action which lets you conditionally run bootstrap actions.
|
48 |
+
*
|
49 |
+
* @param string $condition (Required) The condition to evaluate. If <code>true</code>, the bootstrap action executes.
|
50 |
+
* @param array $args (Optional) An indexed array of arguments to pass to the script.
|
51 |
+
* @return array A configuration set to be provided when running a job flow.
|
52 |
+
*/
|
53 |
+
public static function run_if($condition, $args = null)
|
54 |
+
{
|
55 |
+
if (!$args) $args = array();
|
56 |
+
$args = is_array($args) ? $args : array($args);
|
57 |
+
|
58 |
+
return self::script_runner('s3://us-east-1.elasticmapreduce/bootstrap-actions/run-if', $args);
|
59 |
+
}
|
60 |
+
|
61 |
+
/**
|
62 |
+
* Specify options to merge with Hadoop's default configuration.
|
63 |
+
*
|
64 |
+
* @param string $file (Required) The Hadoop configuration file to merge with. [Allowed values: <code>CFHadoopBootstrap::CONFIG_SITE</code>, <code>CFHadoopBootstrap::CONFIG_DEFAULT</code>, <code>CFHadoopBootstrap::CONFIG_CORE</code>, <code>CFHadoopBootstrap::CONFIG_HDFS</code>, <code>CFHadoopBootstrap::CONFIG_MAPREDUCE</code>]
|
65 |
+
* @param string|array $config (Required) This can either be an XML file in S3 (as <code>s3://bucket/path</code>), or an associative array of key-value pairs.
|
66 |
+
* @return array A configuration set to be provided when running a job flow.
|
67 |
+
*/
|
68 |
+
public static function configure($file, $config)
|
69 |
+
{
|
70 |
+
$args = array();
|
71 |
+
$file_arg = '-' . $file;
|
72 |
+
|
73 |
+
if (is_string($config))
|
74 |
+
{
|
75 |
+
$args[] = $file_arg;
|
76 |
+
$args[] = $config;
|
77 |
+
}
|
78 |
+
elseif (is_array($config))
|
79 |
+
{
|
80 |
+
foreach ($config as $key => $value)
|
81 |
+
{
|
82 |
+
$args[] = $file_arg;
|
83 |
+
$args[] = $key . '=' . $value;
|
84 |
+
}
|
85 |
+
}
|
86 |
+
|
87 |
+
return self::script_runner('s3://us-east-1.elasticmapreduce/bootstrap-actions/configure-hadoop', $args);
|
88 |
+
}
|
89 |
+
|
90 |
+
/**
|
91 |
+
* Create a new bootstrap action which lets you configure Hadoop's daemons. The options are written to
|
92 |
+
* the <code>hadoop-user-env.sh</code> file.
|
93 |
+
*
|
94 |
+
* @param string $daemon_type (Required) The Hadoop daemon to configure.
|
95 |
+
* @param array $opt (Optional) An associative array of parameters that can have the following keys: <ul>
|
96 |
+
* <li><code>HeapSize</code> - <code>integer</code> - Optional - The requested heap size of the daemon, in megabytes.</li>
|
97 |
+
* <li><code>CLIOptions</code> - <code>string</code> - Optional - Additional Java command line arguments to pass to the daemon.</li>
|
98 |
+
* <li><code>Replace</code> - <code>boolean</code> - Optional - Whether or not the file should be replaced. A value of <code>true</code> will replace the existing configuration file. A value of <code>false</code> will append the options to the configuration file.</li></ul>
|
99 |
+
* @return array A configuration set to be provided when running a job flow.
|
100 |
+
*/
|
101 |
+
public static function daemon($daemon_type, $opt = null)
|
102 |
+
{
|
103 |
+
if (!$opt) $opt = array();
|
104 |
+
$args = array();
|
105 |
+
|
106 |
+
foreach ($opt as $key => $value)
|
107 |
+
{
|
108 |
+
switch ($key)
|
109 |
+
{
|
110 |
+
case 'HeapSize':
|
111 |
+
$args[] = '--' . $daemon_type . '-heap-size=' . $value;
|
112 |
+
break;
|
113 |
+
case 'CLIOptions':
|
114 |
+
$args[] = '--' . $daemon_type . '-opts="' . $value . '"';
|
115 |
+
break;
|
116 |
+
case 'Replace':
|
117 |
+
if ((is_string($value) && $value === 'true') || (is_bool($value) && $value === true))
|
118 |
+
{
|
119 |
+
$args[] = '--replace';
|
120 |
+
}
|
121 |
+
break;
|
122 |
+
}
|
123 |
+
}
|
124 |
+
|
125 |
+
return self::script_runner('s3://us-east-1.elasticmapreduce/bootstrap-actions/configure-daemons', $args);
|
126 |
+
}
|
127 |
+
}
|
libs/dropbox.php
ADDED
@@ -0,0 +1,677 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?PHP
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Dropbox class
|
5 |
+
*
|
6 |
+
* This source file can be used to communicate with DropBox (http://dropbox.com)
|
7 |
+
*
|
8 |
+
* The class is documented in the file itself. If you find any bugs help me out and report them.
|
9 |
+
* If you report a bug, make sure you give me enough information (include your code).
|
10 |
+
*
|
11 |
+
*
|
12 |
+
*
|
13 |
+
* License
|
14 |
+
* Copyright (c), Daniel Huesken. All rights reserved.
|
15 |
+
*
|
16 |
+
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
17 |
+
*
|
18 |
+
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
19 |
+
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
20 |
+
* 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
|
21 |
+
*
|
22 |
+
* This software is provided by the author "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.
|
23 |
+
*
|
24 |
+
* @author Daniel Huesken <daniel@huesken-net.de>
|
25 |
+
* @version 2.0.0
|
26 |
+
*
|
27 |
+
* @copyright Copyright (c), Daniel Huesken. All rights reserved.
|
28 |
+
* @license BSD License
|
29 |
+
*/
|
30 |
+
|
31 |
+
class backwpup_Dropbox {
|
32 |
+
const API_URL = 'https://api.dropbox.com/';
|
33 |
+
const API_CONTENT_URL = 'https://api-content.dropbox.com/';
|
34 |
+
const API_WWW_URL = 'https://www.dropbox.com/';
|
35 |
+
const API_VERSION_URL = '1/';
|
36 |
+
|
37 |
+
protected $root = 'dropbox';
|
38 |
+
protected $OAuthObject;
|
39 |
+
protected $OAuthToken;
|
40 |
+
protected $ProgressFunction = false;
|
41 |
+
|
42 |
+
public function __construct($applicationKey, $applicationSecret,$root='dropbox') {
|
43 |
+
$this->OAuthObject = new backwpup_OAuthSimple($applicationKey, $applicationSecret);
|
44 |
+
if ($root=='sandbox')
|
45 |
+
$this->root = 'sandbox';
|
46 |
+
else
|
47 |
+
$this->root = 'dropbox';
|
48 |
+
}
|
49 |
+
|
50 |
+
public function setOAuthTokens($token,$secret) {
|
51 |
+
$this->OAuthToken = array('oauth_token'=>$token,'oauth_secret'=> $secret);
|
52 |
+
}
|
53 |
+
|
54 |
+
public function setProgressFunction($function) {
|
55 |
+
if (function_exists($function))
|
56 |
+
$this->ProgressFunction = $function;
|
57 |
+
else
|
58 |
+
$this->ProgressFunction = false;
|
59 |
+
}
|
60 |
+
|
61 |
+
public function accountInfo(){
|
62 |
+
$url = self::API_URL.self::API_VERSION_URL.'account/info';
|
63 |
+
return $this->request($url);
|
64 |
+
}
|
65 |
+
|
66 |
+
public function upload($file, $path = '',$overwrite=true){
|
67 |
+
$file = str_replace("\\", "/",$file);
|
68 |
+
if (!is_readable($file) or !is_file($file)){
|
69 |
+
throw new DropboxException("Error: File \"$file\" is not readable or doesn't exist.");
|
70 |
+
}
|
71 |
+
if (filesize($file)>157286400){
|
72 |
+
throw new DropboxException("Error: File \"$file\" is to big max. 150 MB.");
|
73 |
+
}
|
74 |
+
$url = self::API_CONTENT_URL.self::API_VERSION_URL.'files_put/'.$this->root.'/'.trim($path, '/').'/'.basename($file);
|
75 |
+
return $this->request($url, array('overwrite' => ($overwrite)? 'true' : 'false'), 'PUT', $file);
|
76 |
+
}
|
77 |
+
|
78 |
+
public function download($path,$echo=false){
|
79 |
+
$url = self::API_CONTENT_URL.self::API_VERSION_URL.'files/'.$this->root.'/'.trim($path,'/');
|
80 |
+
if (!$echo)
|
81 |
+
return $this->request($url);
|
82 |
+
else
|
83 |
+
$this->request($url,'','GET','',true);
|
84 |
+
}
|
85 |
+
|
86 |
+
public function metadata($path = '', $listContents = true, $fileLimit = 10000){
|
87 |
+
$url = self::API_URL.self::API_VERSION_URL.'metadata/'.$this->root.'/'.trim($path,'/');
|
88 |
+
return $this->request($url, array('list' => ($listContents)? 'true' : 'false', 'file_limit' => $fileLimit));
|
89 |
+
}
|
90 |
+
|
91 |
+
public function fileopsDelete($path){
|
92 |
+
$url = self::API_URL.self::API_VERSION_URL.'fileops/delete';
|
93 |
+
return $this->request($url, array('path' => $path, 'root' => $this->root));
|
94 |
+
}
|
95 |
+
|
96 |
+
public function fileopsCreate_folder($path){
|
97 |
+
$url = self::API_URL.self::API_VERSION_URL.'fileops/create_folder';
|
98 |
+
return $this->request($url, array('path' => $path, 'root' => $this->root));
|
99 |
+
}
|
100 |
+
|
101 |
+
public function oAuthAuthorize($callback_url) {
|
102 |
+
//request tokens
|
103 |
+
$OAuthSign = $this->OAuthObject->sign(array(
|
104 |
+
'path' =>self::API_URL.self::API_VERSION_URL.'oauth/request_token',
|
105 |
+
'method' => 'HMAC-SHA1',
|
106 |
+
'action' =>'GET',
|
107 |
+
'parameters'=>array('oauth_callback'=>$callback_url)));
|
108 |
+
$ch = curl_init();
|
109 |
+
curl_setopt($ch, CURLOPT_URL, $OAuthSign['signed_url']);
|
110 |
+
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
111 |
+
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
112 |
+
curl_setopt($ch, CURLOPT_SSLVERSION,3);
|
113 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
114 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
115 |
+
curl_setopt($ch, CURLOPT_AUTOREFERER , true);
|
116 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
117 |
+
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
|
118 |
+
$content = curl_exec($ch);
|
119 |
+
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
120 |
+
if ($status>=200 and $status<300 and 0==curl_errno($ch) ) {
|
121 |
+
parse_str($content, $oauth_token);
|
122 |
+
} else {
|
123 |
+
$output = json_decode($content, true);
|
124 |
+
if(isset($output['error']) && is_string($output['error'])) $message = $output['error'];
|
125 |
+
elseif(isset($output['error']['hash']) && $output['error']['hash'] != '') $message = (string) $output['error']['hash'];
|
126 |
+
elseif (0!=curl_errno($ch)) $message = '('.curl_errno($ch).') '.curl_error($ch);
|
127 |
+
else $message = '('.$status.') Invalid response.';
|
128 |
+
throw new DropboxException($message);
|
129 |
+
}
|
130 |
+
curl_close($ch);
|
131 |
+
$OAuthSign = $this->OAuthObject->sign(array(
|
132 |
+
'path' =>self::API_WWW_URL.self::API_VERSION_URL.'oauth/authorize',
|
133 |
+
'action' =>'GET',
|
134 |
+
'parameters'=>array(
|
135 |
+
'oauth_token' => $oauth_token['oauth_token'])));
|
136 |
+
return array('authurl'=>$OAuthSign['signed_url'],'oauth_token'=>$oauth_token['oauth_token'],'oauth_token_secret'=>$oauth_token['oauth_token_secret']);
|
137 |
+
}
|
138 |
+
|
139 |
+
public function oAuthAccessToken($oauth_token, $oauth_token_secret) {
|
140 |
+
$OAuthSign = $this->OAuthObject->sign(array(
|
141 |
+
'path' => self::API_URL.self::API_VERSION_URL.'oauth/access_token',
|
142 |
+
'action' =>'GET',
|
143 |
+
'method' => 'HMAC-SHA1',
|
144 |
+
'parameters'=>array('oauth_token' => $oauth_token),
|
145 |
+
'signatures'=>array('oauth_token'=>$oauth_token,'oauth_secret'=>$oauth_token_secret)));
|
146 |
+
$ch = curl_init();
|
147 |
+
curl_setopt($ch, CURLOPT_URL, $OAuthSign['signed_url']);
|
148 |
+
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
149 |
+
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
150 |
+
curl_setopt($ch, CURLOPT_SSLVERSION,3);
|
151 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
152 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
153 |
+
curl_setopt($ch, CURLOPT_AUTOREFERER , true);
|
154 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
155 |
+
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
|
156 |
+
$content = curl_exec($ch);
|
157 |
+
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
158 |
+
if ($status>=200 and $status<300 and 0==curl_errno($ch)) {
|
159 |
+
parse_str($content, $oauth_token);
|
160 |
+
$this->setOAuthTokens($oauth_token['oauth_token'],$oauth_token['oauth_token_secret']);
|
161 |
+
return $oauth_token;
|
162 |
+
} else {
|
163 |
+
$output = json_decode($content, true);
|
164 |
+
if(isset($output['error']) && is_string($output['error'])) $message = $output['error'];
|
165 |
+
elseif(isset($output['error']['hash']) && $output['error']['hash'] != '') $message = (string) $output['error']['hash'];
|
166 |
+
elseif (0!=curl_errno($ch)) $message = '('.curl_errno($ch).') '.curl_error($ch);
|
167 |
+
else $message = '('.$status.') Invalid response.';
|
168 |
+
throw new DropboxException($message);
|
169 |
+
}
|
170 |
+
}
|
171 |
+
|
172 |
+
protected function request($url, $args = null, $method = 'GET', $file = null,$echo=false){
|
173 |
+
$args = (is_array($args)) ? $args : array();
|
174 |
+
/* Sign Request*/
|
175 |
+
$this->OAuthObject->reset();
|
176 |
+
$OAuthSign=$this->OAuthObject->sign(array(
|
177 |
+
'path' => $url,
|
178 |
+
'parameters'=> $args,
|
179 |
+
'action'=> $method,
|
180 |
+
'method' => 'HMAC-SHA1',
|
181 |
+
'signatures'=> $this->OAuthToken));
|
182 |
+
|
183 |
+
/* Header*/
|
184 |
+
$headers[]='Expect:';
|
185 |
+
|
186 |
+
/* Build cURL Request */
|
187 |
+
$ch = curl_init();
|
188 |
+
if ($method == 'POST') {
|
189 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
190 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $args);
|
191 |
+
$args = (is_array($args)) ? http_build_query($args) : $args;
|
192 |
+
$headers[]='Content-Length: ' .strlen($args);
|
193 |
+
$headers[]='Authorization: '.$OAuthSign['header'];
|
194 |
+
curl_setopt($ch, CURLOPT_URL, $url);
|
195 |
+
} elseif ($method == 'PUT') {
|
196 |
+
$datafilefd=fopen($file,'r');
|
197 |
+
curl_setopt($ch,CURLOPT_PUT,true);
|
198 |
+
curl_setopt($ch,CURLOPT_INFILE,$datafilefd);
|
199 |
+
curl_setopt($ch,CURLOPT_INFILESIZE,filesize($file));
|
200 |
+
$args = (is_array($args)) ? '?'.http_build_query($args) : $args;
|
201 |
+
$headers[]='Authorization: '.$OAuthSign['header'];
|
202 |
+
curl_setopt($ch, CURLOPT_URL, $url.$args);
|
203 |
+
} else {
|
204 |
+
$headers[]='Authorization: '.$OAuthSign['header'];
|
205 |
+
$args = (is_array($args)) ? '?'.http_build_query($args) : $args;
|
206 |
+
curl_setopt($ch, CURLOPT_URL, $url.$args);
|
207 |
+
}
|
208 |
+
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
209 |
+
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
|
210 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
211 |
+
curl_setopt($ch, CURLOPT_SSLVERSION,3);
|
212 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
213 |
+
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
|
214 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
215 |
+
curl_setopt($ch, CURLOPT_FRESH_CONNECT, true);
|
216 |
+
curl_setopt($ch, CURLINFO_HEADER_OUT, true);
|
217 |
+
if (function_exists($this->ProgressFunction) and defined('CURLOPT_PROGRESSFUNCTION')) {
|
218 |
+
curl_setopt($ch, CURLOPT_NOPROGRESS, false);
|
219 |
+
curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, $this->ProgressFunction);
|
220 |
+
curl_setopt($ch, CURLOPT_BUFFERSIZE, 512);
|
221 |
+
}
|
222 |
+
if ($echo) {
|
223 |
+
echo curl_exec($ch);
|
224 |
+
$output='';
|
225 |
+
} else {
|
226 |
+
$content = curl_exec($ch);
|
227 |
+
$output = json_decode($content, true);
|
228 |
+
}
|
229 |
+
$status = curl_getinfo($ch);
|
230 |
+
|
231 |
+
if (isset($output['error']) or $status['http_code']>=300 or $status['http_code']<200 or curl_errno($ch)>0) {
|
232 |
+
if(isset($output['error']) && is_string($output['error'])) $message = '('.$status['http_code'].') '.$output['error'];
|
233 |
+
elseif(isset($output['error']['hash']) && $output['error']['hash'] != '') $message = (string) '('.$status['http_code'].') '.$output['error']['hash'];
|
234 |
+
elseif (0!=curl_errno($ch)) $message = '('.curl_errno($ch).') '.curl_error($ch);
|
235 |
+
elseif ($status['http_code']==400) $message = '(400) Bad input parameter: '.strip_tags($content);
|
236 |
+
elseif ($status['http_code']==401) $message = '(401) Bad or expired token. This can happen if the user or Dropbox revoked or expired an access token. To fix, you should re-authenticate the user.';
|
237 |
+
elseif ($status['http_code']==403) $message = '(403) Bad OAuth request (wrong consumer key, bad nonce, expired timestamp, ...). Unfortunately, reauthenticating the user won\'t help here.';
|
238 |
+
elseif ($status['http_code']==404) $message = '(404) The file was not found at the specified path, or was not found at the specified rev.';
|
239 |
+
elseif ($status['http_code']==405) $message = '(405) Request method not expected (generally should be GET,PUT or POST).';
|
240 |
+
elseif ($status['http_code']==411) $message = '(411) Chunked encoding was attempted for this upload, but is not supported by Dropbox.';
|
241 |
+
elseif ($status['http_code']==503) $message = '(503) Your app is making too many requests and is being rate limited. 503s can trigger on a per-app or per-user basis.';
|
242 |
+
elseif ($status['http_code']==507) $message = '(507) User is over Dropbox storage quota.';
|
243 |
+
else $message = '('.$status['http_code'].') Invalid response.';
|
244 |
+
throw new DropboxException($message);
|
245 |
+
} else {
|
246 |
+
curl_close($ch);
|
247 |
+
if (!is_array($output))
|
248 |
+
return $content;
|
249 |
+
else
|
250 |
+
return $output;
|
251 |
+
}
|
252 |
+
}
|
253 |
+
|
254 |
+
}
|
255 |
+
|
256 |
+
class DropboxException extends Exception {
|
257 |
+
}
|
258 |
+
|
259 |
+
|
260 |
+
/* OAuthSimple
|
261 |
+
* A simpler version of OAuth
|
262 |
+
*
|
263 |
+
* author: jr conlin
|
264 |
+
* mail: src@jrconlin.com
|
265 |
+
* copyright: unitedHeroes.net
|
266 |
+
* version: 1.2
|
267 |
+
* url: http://unitedHeroes.net/OAuthSimple
|
268 |
+
*
|
269 |
+
* Copyright (c) 2010, unitedHeroes.net
|
270 |
+
* All rights reserved.
|
271 |
+
*
|
272 |
+
* Redistribution and use in source and binary forms, with or without
|
273 |
+
* modification, are permitted provided that the following conditions are met:
|
274 |
+
* * Redistributions of source code must retain the above copyright
|
275 |
+
* notice, this list of conditions and the following disclaimer.
|
276 |
+
* * Redistributions in binary form must reproduce the above copyright
|
277 |
+
* notice, this list of conditions and the following disclaimer in the
|
278 |
+
* documentation and/or other materials provided with the distribution.
|
279 |
+
* * Neither the name of the unitedHeroes.net nor the
|
280 |
+
* names of its contributors may be used to endorse or promote products
|
281 |
+
* derived from this software without specific prior written permission.
|
282 |
+
*
|
283 |
+
* THIS SOFTWARE IS PROVIDED BY UNITEDHEROES.NET ''AS IS'' AND ANY
|
284 |
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
285 |
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
286 |
+
* DISCLAIMED. IN NO EVENT SHALL UNITEDHEROES.NET BE LIABLE FOR ANY
|
287 |
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
288 |
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
289 |
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
290 |
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
291 |
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
292 |
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
293 |
+
*/
|
294 |
+
|
295 |
+
/** Define a custom Exception for easy trap and detection
|
296 |
+
*/
|
297 |
+
class backwpup_OAuthSimpleException extends Exception {}
|
298 |
+
|
299 |
+
|
300 |
+
class backwpup_OAuthSimple {
|
301 |
+
var $_secrets;
|
302 |
+
var $_default_signature_method;
|
303 |
+
var $_action;
|
304 |
+
var $_nonce_chars;
|
305 |
+
|
306 |
+
/* Simple OAuth
|
307 |
+
*
|
308 |
+
* This class only builds the OAuth elements, it does not do the actual
|
309 |
+
* transmission or reception of the tokens. It does not validate elements
|
310 |
+
* of the token. It is for client use only.
|
311 |
+
*
|
312 |
+
* api_key is the API key, also known as the OAuth consumer key
|
313 |
+
* shared_secret is the shared secret (duh).
|
314 |
+
*
|
315 |
+
* Both the api_key and shared_secret are generally provided by the site
|
316 |
+
* offering OAuth services. You need to specify them at object creation
|
317 |
+
* because nobody <explative>ing uses OAuth without that minimal set of
|
318 |
+
* signatures.
|
319 |
+
*
|
320 |
+
* If you want to use the higher order security that comes from the
|
321 |
+
* OAuth token (sorry, I don't provide the functions to fetch that because
|
322 |
+
* sites aren't horribly consistent about how they offer that), you need to
|
323 |
+
* pass those in either with .signatures() or as an argument to the
|
324 |
+
* .sign() or .getHeaderString() functions.
|
325 |
+
*
|
326 |
+
* Example:
|
327 |
+
<code>
|
328 |
+
<?php
|
329 |
+
$oauthObject = new OAuthSimple();
|
330 |
+
$result = $oauthObject->sign(Array('path'=>'http://example.com/rest/',
|
331 |
+
'parameters'=> 'foo=bar&gorp=banana',
|
332 |
+
'signatures'=> Array(
|
333 |
+
'api_key'=>'12345abcd',
|
334 |
+
'shared_secret'=>'xyz-5309'
|
335 |
+
)));
|
336 |
+
?>
|
337 |
+
<a href="<?php print $result['signed_url']; ?>">Some Link</a>;
|
338 |
+
</code>
|
339 |
+
*
|
340 |
+
* that will sign as a "GET" using "SHA1-MAC" the url. If you need more than
|
341 |
+
* that, read on, McDuff.
|
342 |
+
*/
|
343 |
+
|
344 |
+
/** OAuthSimple creator
|
345 |
+
*
|
346 |
+
* Create an instance of OAuthSimple
|
347 |
+
*
|
348 |
+
* @param api_key {string} The API Key (sometimes referred to as the consumer key) This value is usually supplied by the site you wish to use.
|
349 |
+
* @param shared_secret (string) The shared secret. This value is also usually provided by the site you wish to use.
|
350 |
+
*/
|
351 |
+
function backwpup_OAuthSimple ($APIKey = "",$sharedSecret=""){
|
352 |
+
if (!empty($APIKey))
|
353 |
+
$this->_secrets{'consumer_key'}=$APIKey;
|
354 |
+
if (!empty($sharedSecret))
|
355 |
+
$this->_secrets{'shared_secret'}=$sharedSecret;
|
356 |
+
$this->_default_signature_method="HMAC-SHA1";
|
357 |
+
$this->_action="GET";
|
358 |
+
$this->_nonce_chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
359 |
+
return $this;
|
360 |
+
}
|
361 |
+
|
362 |
+
/** reset the parameters and url
|
363 |
+
*
|
364 |
+
*/
|
365 |
+
function reset() {
|
366 |
+
$this->_parameters=null;
|
367 |
+
$this->path=null;
|
368 |
+
$this->sbs=null;
|
369 |
+
return $this;
|
370 |
+
}
|
371 |
+
|
372 |
+
/** set the parameters either from a hash or a string
|
373 |
+
*
|
374 |
+
* @param {string,object} List of parameters for the call, this can either be a URI string (e.g. "foo=bar&gorp=banana" or an object/hash)
|
375 |
+
*/
|
376 |
+
function setParameters ($parameters=Array()) {
|
377 |
+
|
378 |
+
if (is_string($parameters))
|
379 |
+
$parameters = $this->_parseParameterString($parameters);
|
380 |
+
if (empty($this->_parameters))
|
381 |
+
$this->_parameters = $parameters;
|
382 |
+
elseif (!empty($parameters))
|
383 |
+
$this->_parameters = array_merge($this->_parameters,$parameters);
|
384 |
+
if (empty($this->_parameters['oauth_nonce']))
|
385 |
+
$this->_getNonce();
|
386 |
+
if (empty($this->_parameters['oauth_timestamp']))
|
387 |
+
$this->_getTimeStamp();
|
388 |
+
if (empty($this->_parameters['oauth_consumer_key']))
|
389 |
+
$this->_getApiKey();
|
390 |
+
if (empty($this->_parameters['oauth_token']))
|
391 |
+
$this->_getAccessToken();
|
392 |
+
if (empty($this->_parameters['oauth_signature_method']))
|
393 |
+
$this->setSignatureMethod();
|
394 |
+
if (empty($this->_parameters['oauth_version']))
|
395 |
+
$this->_parameters['oauth_version']="1.0";
|
396 |
+
//error_log('parameters: '.print_r($this,1));
|
397 |
+
return $this;
|
398 |
+
}
|
399 |
+
|
400 |
+
// convienence method for setParameters
|
401 |
+
function setQueryString ($parameters) {
|
402 |
+
return $this->setParameters($parameters);
|
403 |
+
}
|
404 |
+
|
405 |
+
/** Set the target URL (does not include the parameters)
|
406 |
+
*
|
407 |
+
* @param path {string} the fully qualified URI (excluding query arguments) (e.g "http://example.org/foo")
|
408 |
+
*/
|
409 |
+
function setURL ($path) {
|
410 |
+
if (empty($path))
|
411 |
+
throw new backwpup_OAuthSimpleException('No path specified for OAuthSimple.setURL');
|
412 |
+
$this->_path=$path;
|
413 |
+
return $this;
|
414 |
+
}
|
415 |
+
|
416 |
+
/** convienence method for setURL
|
417 |
+
*
|
418 |
+
* @param path {string} see .setURL
|
419 |
+
*/
|
420 |
+
function setPath ($path) {
|
421 |
+
return $this->_path=$path;
|
422 |
+
}
|
423 |
+
|
424 |
+
/** set the "action" for the url, (e.g. GET,POST, DELETE, etc.)
|
425 |
+
*
|
426 |
+
* @param action {string} HTTP Action word.
|
427 |
+
*/
|
428 |
+
function setAction ($action) {
|
429 |
+
if (empty($action))
|
430 |
+
$action = 'GET';
|
431 |
+
$action = strtoupper($action);
|
432 |
+
if (preg_match('/[^A-Z]/',$action))
|
433 |
+
throw new backwpup_OAuthSimpleException('Invalid action specified for OAuthSimple.setAction');
|
434 |
+
$this->_action = $action;
|
435 |
+
return $this;
|
436 |
+
}
|
437 |
+
|
438 |
+
/** set the signatures (as well as validate the ones you have)
|
439 |
+
*
|
440 |
+
* @param signatures {object} object/hash of the token/signature pairs {api_key:, shared_secret:, oauth_token: oauth_secret:}
|
441 |
+
*/
|
442 |
+
function signatures ($signatures) {
|
443 |
+
if (!empty($signatures) && !is_array($signatures))
|
444 |
+
throw new backwpup_OAuthSimpleException('Must pass dictionary array to OAuthSimple.signatures');
|
445 |
+
if (!empty($signatures)){
|
446 |
+
if (empty($this->_secrets)) {
|
447 |
+
$this->_secrets=Array();
|
448 |
+
}
|
449 |
+
$this->_secrets=array_merge($this->_secrets,$signatures);
|
450 |
+
}
|
451 |
+
// Aliases
|
452 |
+
if (isset($this->_secrets['api_key']))
|
453 |
+
$this->_secrets['consumer_key'] = $this->_secrets['api_key'];
|
454 |
+
if (isset($this->_secrets['access_token']))
|
455 |
+
$this->_secrets['oauth_token'] = $this->_secrets['access_token'];
|
456 |
+
if (isset($this->_secrets['access_secret']))
|
457 |
+
$this->_secrets['oauth_secret'] = $this->_secrets['access_secret'];
|
458 |
+
if (isset($this->_secrets['access_token_secret']))
|
459 |
+
$this->_secrets['oauth_secret'] = $this->_secrets['access_token_secret'];
|
460 |
+
// Gauntlet
|
461 |
+
if (empty($this->_secrets['consumer_key']))
|
462 |
+
throw new backwpup_OAuthSimpleException('Missing required consumer_key in OAuthSimple.signatures');
|
463 |
+
if (empty($this->_secrets['shared_secret']))
|
464 |
+
throw new backwpup_OAuthSimpleException('Missing requires shared_secret in OAuthSimple.signatures');
|
465 |
+
if (!empty($this->_secrets['oauth_token']) && empty($this->_secrets['oauth_secret']))
|
466 |
+
throw new backwpup_OAuthSimpleException('Missing oauth_secret for supplied oauth_token in OAuthSimple.signatures');
|
467 |
+
return $this;
|
468 |
+
}
|
469 |
+
|
470 |
+
function setTokensAndSecrets($signatures) {
|
471 |
+
return $this->signatures($signatures);
|
472 |
+
}
|
473 |
+
|
474 |
+
/** set the signature method (currently only Plaintext or SHA-MAC1)
|
475 |
+
*
|
476 |
+
* @param method {string} Method of signing the transaction (only PLAINTEXT and SHA-MAC1 allowed for now)
|
477 |
+
*/
|
478 |
+
function setSignatureMethod ($method="") {
|
479 |
+
if (empty($method))
|
480 |
+
$method = $this->_default_signature_method;
|
481 |
+
$method = strtoupper($method);
|
482 |
+
switch($method)
|
483 |
+
{
|
484 |
+
case 'PLAINTEXT':
|
485 |
+
case 'HMAC-SHA1':
|
486 |
+
$this->_parameters['oauth_signature_method']=$method;
|
487 |
+
break;
|
488 |
+
default:
|
489 |
+
throw new backwpup_OAuthSimpleException ("Unknown signing method $method specified for OAuthSimple.setSignatureMethod");
|
490 |
+
}
|
491 |
+
return $this;
|
492 |
+
}
|
493 |
+
|
494 |
+
/** sign the request
|
495 |
+
*
|
496 |
+
* note: all arguments are optional, provided you've set them using the
|
497 |
+
* other helper functions.
|
498 |
+
*
|
499 |
+
* @param args {object} hash of arguments for the call
|
500 |
+
* {action, path, parameters (array), method, signatures (array)}
|
501 |
+
* all arguments are optional.
|
502 |
+
*/
|
503 |
+
function sign($args=array()) {
|
504 |
+
if (!empty($args['action']))
|
505 |
+
$this->setAction($args['action']);
|
506 |
+
if (!empty($args['path']))
|
507 |
+
$this->setPath($args['path']);
|
508 |
+
if (!empty($args['method']))
|
509 |
+
$this->setSignatureMethod($args['method']);
|
510 |
+
if (!empty($args['signatures']))
|
511 |
+
$this->signatures($args['signatures']);
|
512 |
+
if (empty($args['parameters']))
|
513 |
+
$args['parameters']=array(); // squelch the warning.
|
514 |
+
$this->setParameters($args['parameters']);
|
515 |
+
$normParams = $this->_normalizedParameters();
|
516 |
+
$this->_parameters['oauth_signature'] = $this->_generateSignature($normParams);
|
517 |
+
return Array(
|
518 |
+
'parameters' => $this->_parameters,
|
519 |
+
'signature' => $this->_oauthEscape($this->_parameters['oauth_signature']),
|
520 |
+
'signed_url' => $this->_path . '?' . $this->_normalizedParameters(),
|
521 |
+
'header' => $this->getHeaderString(),
|
522 |
+
'sbs'=> $this->sbs
|
523 |
+
);
|
524 |
+
}
|
525 |
+
|
526 |
+
/** Return a formatted "header" string
|
527 |
+
*
|
528 |
+
* NOTE: This doesn't set the "Authorization: " prefix, which is required.
|
529 |
+
* I don't set it because various set header functions prefer different
|
530 |
+
* ways to do that.
|
531 |
+
*
|
532 |
+
* @param args {object} see .sign
|
533 |
+
*/
|
534 |
+
function getHeaderString ($args=array()) {
|
535 |
+
if (empty($this->_parameters['oauth_signature']))
|
536 |
+
$this->sign($args);
|
537 |
+
|
538 |
+
$result = 'OAuth ';
|
539 |
+
|
540 |
+
foreach ($this->_parameters as $pName=>$pValue)
|
541 |
+
{
|
542 |
+
if (strpos($pName,'oauth_') !== 0)
|
543 |
+
continue;
|
544 |
+
if (is_array($pValue))
|
545 |
+
{
|
546 |
+
foreach ($pValue as $val)
|
547 |
+
{
|
548 |
+
$result .= $pName .'="' . $this->_oauthEscape($val) . '", ';
|
549 |
+
}
|
550 |
+
}
|
551 |
+
else
|
552 |
+
{
|
553 |
+
$result .= $pName . '="' . $this->_oauthEscape($pValue) . '", ';
|
554 |
+
}
|
555 |
+
}
|
556 |
+
return preg_replace('/, $/','',$result);
|
557 |
+
}
|
558 |
+
|
559 |
+
// Start private methods. Here be Dragons.
|
560 |
+
// No promises are kept that any of these functions will continue to exist
|
561 |
+
// in future versions.
|
562 |
+
function _parseParameterString ($paramString) {
|
563 |
+
$elements = explode('&',$paramString);
|
564 |
+
$result = array();
|
565 |
+
foreach ($elements as $element)
|
566 |
+
{
|
567 |
+
list ($key,$token) = explode('=',$element);
|
568 |
+
if ($token)
|
569 |
+
$token = urldecode($token);
|
570 |
+
if (!empty($result[$key]))
|
571 |
+
{
|
572 |
+
if (!is_array($result[$key]))
|
573 |
+
$result[$key] = array($result[$key],$token);
|
574 |
+
else
|
575 |
+
array_push($result[$key],$token);
|
576 |
+
}
|
577 |
+
else
|
578 |
+
$result[$key]=$token;
|
579 |
+
}
|
580 |
+
//error_log('Parse parameters : '.print_r($result,1));
|
581 |
+
return $result;
|
582 |
+
}
|
583 |
+
|
584 |
+
function _oauthEscape($string) {
|
585 |
+
if ($string === 0)
|
586 |
+
return 0;
|
587 |
+
if (empty($string))
|
588 |
+
return '';
|
589 |
+
if (is_array($string))
|
590 |
+
throw new backwpup_OAuthSimpleException('Array passed to _oauthEscape');
|
591 |
+
$string = urlencode($string);
|
592 |
+
$string = str_replace('+','%20',$string);
|
593 |
+
$string = str_replace('!','%21',$string);
|
594 |
+
$string = str_replace('*','%2A',$string);
|
595 |
+
$string = str_replace('\'','%27',$string);
|
596 |
+
$string = str_replace('(','%28',$string);
|
597 |
+
$string = str_replace(')','%29',$string);
|
598 |
+
return $string;
|
599 |
+
}
|
600 |
+
|
601 |
+
function _getNonce($length=5) {
|
602 |
+
$result = '';
|
603 |
+
$cLength = strlen($this->_nonce_chars);
|
604 |
+
for ($i=0; $i < $length; $i++)
|
605 |
+
{
|
606 |
+
$rnum = rand(0,$cLength);
|
607 |
+
$result .= substr($this->_nonce_chars,$rnum,1);
|
608 |
+
}
|
609 |
+
$this->_parameters['oauth_nonce'] = $result;
|
610 |
+
return $result;
|
611 |
+
}
|
612 |
+
|
613 |
+
function _getApiKey() {
|
614 |
+
if (empty($this->_secrets['consumer_key']))
|
615 |
+
{
|
616 |
+
throw new backwpup_OAuthSimpleException('No consumer_key set for OAuthSimple');
|
617 |
+
}
|
618 |
+
$this->_parameters['oauth_consumer_key']=$this->_secrets['consumer_key'];
|
619 |
+
return $this->_parameters['oauth_consumer_key'];
|
620 |
+
}
|
621 |
+
|
622 |
+
function _getAccessToken() {
|
623 |
+
if (!isset($this->_secrets['oauth_secret']))
|
624 |
+
return '';
|
625 |
+
if (!isset($this->_secrets['oauth_token']))
|
626 |
+
throw new OAuthSimpleException('No access token (oauth_token) set for OAuthSimple.');
|
627 |
+
$this->_parameters['oauth_token'] = $this->_secrets['oauth_token'];
|
628 |
+
return $this->_parameters['oauth_token'];
|
629 |
+
}
|
630 |
+
|
631 |
+
function _getTimeStamp() {
|
632 |
+
return $this->_parameters['oauth_timestamp'] = time();
|
633 |
+
}
|
634 |
+
|
635 |
+
function _normalizedParameters() {
|
636 |
+
$elements = array();
|
637 |
+
$ra = 0;
|
638 |
+
ksort($this->_parameters);
|
639 |
+
foreach ( $this->_parameters as $paramName=>$paramValue) {
|
640 |
+
if (preg_match('/\w+_secret/',$paramName))
|
641 |
+
continue;
|
642 |
+
if (is_array($paramValue))
|
643 |
+
{
|
644 |
+
sort($paramValue);
|
645 |
+
foreach($paramValue as $element)
|
646 |
+
array_push($elements,$this->_oauthEscape($paramName).'='.$this->_oauthEscape($element));
|
647 |
+
continue;
|
648 |
+
}
|
649 |
+
array_push($elements,$this->_oauthEscape($paramName).'='.$this->_oauthEscape($paramValue));
|
650 |
+
}
|
651 |
+
return join('&',$elements);
|
652 |
+
}
|
653 |
+
|
654 |
+
function _generateSignature () {
|
655 |
+
$secretKey = '';
|
656 |
+
if(isset($this->_secrets['shared_secret']))
|
657 |
+
$secretKey = $this->_oauthEscape($this->_secrets['shared_secret']);
|
658 |
+
$secretKey .= '&';
|
659 |
+
if(isset($this->_secrets['oauth_secret']))
|
660 |
+
$secretKey .= $this->_oauthEscape($this->_secrets['oauth_secret']);
|
661 |
+
switch($this->_parameters['oauth_signature_method'])
|
662 |
+
{
|
663 |
+
case 'PLAINTEXT':
|
664 |
+
return urlencode($secretKey);
|
665 |
+
|
666 |
+
case 'HMAC-SHA1':
|
667 |
+
$this->sbs = $this->_oauthEscape($this->_action).'&'.$this->_oauthEscape($this->_path).'&'.$this->_oauthEscape($this->_normalizedParameters());
|
668 |
+
//error_log('SBS: '.$sigString);
|
669 |
+
return base64_encode(hash_hmac('sha1',$this->sbs,$secretKey,true));
|
670 |
+
|
671 |
+
default:
|
672 |
+
throw new backwpup_OAuthSimpleException('Unknown signature method for OAuthSimple');
|
673 |
+
}
|
674 |
+
}
|
675 |
+
}
|
676 |
+
|
677 |
+
?>
|
pages/func_backwpupbackups.php
CHANGED
@@ -288,19 +288,17 @@ function backwpup_get_backup_files($jobid,$dest) {
|
|
288 |
}
|
289 |
//Get files/filinfo from Dropbox
|
290 |
if ($dest=='DROPBOX' and !empty($jobvalue['dropetoken']) and !empty($jobvalue['dropesecret'])) {
|
291 |
-
|
292 |
-
require_once(realpath(dirname(__FILE__).'/../libs/Dropbox/autoload.php'));
|
293 |
try {
|
294 |
-
$
|
295 |
-
$dropbox
|
296 |
-
$
|
297 |
-
$contents = $dropbox->getMetaData($jobvalue['dropedir']);
|
298 |
if (is_array($contents)) {
|
299 |
foreach ($contents['contents'] as $object) {
|
300 |
if ($object['is_dir']!=true) {
|
301 |
$files[$filecounter]['JOBID']=$jobid;
|
302 |
$files[$filecounter]['DEST']=$dest;
|
303 |
-
$files[$filecounter]['folder']="https://api-content.dropbox.com/
|
304 |
$files[$filecounter]['file']=$object['path'];
|
305 |
$files[$filecounter]['filename']=basename($object['path']);
|
306 |
$files[$filecounter]['downloadurl']=backwpup_admin_url('admin.php').'?page=backwpupbackups&action=downloaddropbox&file='.$object['path'].'&jobid='.$jobid;
|
288 |
}
|
289 |
//Get files/filinfo from Dropbox
|
290 |
if ($dest=='DROPBOX' and !empty($jobvalue['dropetoken']) and !empty($jobvalue['dropesecret'])) {
|
291 |
+
require_once(realpath(dirname(__FILE__).'/../libs/dropbox.php'));
|
|
|
292 |
try {
|
293 |
+
$dropbox = new backwpup_Dropbox(BACKWPUP_DROPBOX_APP_KEY, BACKWPUP_DROPBOX_APP_SECRET);
|
294 |
+
$dropbox->setOAuthTokens($jobvalue['dropetoken'],$jobvalue['dropesecret']);
|
295 |
+
$contents = $dropbox->metadata($jobvalue['dropedir']);
|
|
|
296 |
if (is_array($contents)) {
|
297 |
foreach ($contents['contents'] as $object) {
|
298 |
if ($object['is_dir']!=true) {
|
299 |
$files[$filecounter]['JOBID']=$jobid;
|
300 |
$files[$filecounter]['DEST']=$dest;
|
301 |
+
$files[$filecounter]['folder']="https://api-content.dropbox.com/1/files/".$jobvalue['droperoot']."/".dirname($object['path'])."/";
|
302 |
$files[$filecounter]['file']=$object['path'];
|
303 |
$files[$filecounter]['filename']=basename($object['path']);
|
304 |
$files[$filecounter]['downloadurl']=backwpup_admin_url('admin.php').'?page=backwpupbackups&action=downloaddropbox&file='.$object['path'].'&jobid='.$jobid;
|
pages/func_backwpupeditjob.php
CHANGED
@@ -362,7 +362,7 @@ function backwpup_jobedit_metabox_destdropbox($jobvalue) {
|
|
362 |
<?PHP _e('Max. backup files in Dropbox folder:','backwpup'); ?><input name="dropemaxbackups" type="text" size="3" value="<?PHP echo $jobvalue['dropemaxbackups'];?>" class="small-text" /><span class="description"><?PHP _e('(Oldest files will be deleted first.)','backwpup');?></span><br />
|
363 |
</div>
|
364 |
<div class="destlinks">
|
365 |
-
<a name="dropbox" href="http://db.tt/
|
366 |
<a href="https://www.dropbox.com/" target="_blank"><?PHP _e('Webinterface','backwpup'); ?></a><br />
|
367 |
</div>
|
368 |
<br class="clear" />
|
362 |
<?PHP _e('Max. backup files in Dropbox folder:','backwpup'); ?><input name="dropemaxbackups" type="text" size="3" value="<?PHP echo $jobvalue['dropemaxbackups'];?>" class="small-text" /><span class="description"><?PHP _e('(Oldest files will be deleted first.)','backwpup');?></span><br />
|
363 |
</div>
|
364 |
<div class="destlinks">
|
365 |
+
<a name="dropbox" href="http://db.tt/Bm0l8dfn" target="_blank"><?PHP _e('Create Account','backwpup'); ?></a><br />
|
366 |
<a href="https://www.dropbox.com/" target="_blank"><?PHP _e('Webinterface','backwpup'); ?></a><br />
|
367 |
</div>
|
368 |
<br class="clear" />
|
pages/header_backwpupbackups.php
CHANGED
@@ -67,13 +67,12 @@ if (!empty($doaction)) {
|
|
67 |
}
|
68 |
} elseif ($dest=='DROPBOX') {
|
69 |
if (!class_exists('Dropbox_API'))
|
70 |
-
require_once(realpath(dirname(__FILE__).'/../libs/
|
71 |
if (!empty($jobvalue['dropetoken']) and !empty($jobvalue['dropesecret'])) {
|
72 |
try {
|
73 |
-
$
|
74 |
-
$dropbox
|
75 |
-
$
|
76 |
-
$dropbox->delete($backupfile);
|
77 |
unset($dropbox);
|
78 |
} catch (Exception $e) {
|
79 |
$backwpup_message.='DROPBOX: '.$e->getMessage().'<br />';
|
@@ -198,24 +197,24 @@ if (!empty($doaction)) {
|
|
198 |
case 'downloaddropbox': //Download Dropbox Backup
|
199 |
check_admin_referer('download-backup');
|
200 |
if (!class_exists('Dropbox_API'))
|
201 |
-
require_once(realpath(dirname(__FILE__).'/../libs/
|
202 |
$jobs=get_option('backwpup_jobs');
|
203 |
$jobid=$_GET['jobid'];
|
204 |
try {
|
205 |
-
$
|
206 |
-
$dropbox
|
207 |
-
$
|
208 |
header("Pragma: public");
|
209 |
header("Expires: 0");
|
210 |
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
211 |
-
|
212 |
header("Content-Type: application/force-download");
|
213 |
header("Content-Type: application/octet-stream");
|
214 |
header("Content-Type: application/download");
|
215 |
header("Content-Disposition: attachment; filename=".basename($_GET['file']).";");
|
216 |
header("Content-Transfer-Encoding: binary");
|
217 |
-
|
218 |
-
|
219 |
die();
|
220 |
} catch (Exception $e) {
|
221 |
die($e->getMessage());
|
67 |
}
|
68 |
} elseif ($dest=='DROPBOX') {
|
69 |
if (!class_exists('Dropbox_API'))
|
70 |
+
require_once(realpath(dirname(__FILE__).'/../libs/dropbox.php'));
|
71 |
if (!empty($jobvalue['dropetoken']) and !empty($jobvalue['dropesecret'])) {
|
72 |
try {
|
73 |
+
$dropbox = new backwpup_Dropbox(BACKWPUP_DROPBOX_APP_KEY, BACKWPUP_DROPBOX_APP_SECRET);
|
74 |
+
$dropbox->setOAuthTokens($jobvalue['dropetoken'],$jobvalue['dropesecret']);
|
75 |
+
$dropbox->fileopsDelete($backupfile);
|
|
|
76 |
unset($dropbox);
|
77 |
} catch (Exception $e) {
|
78 |
$backwpup_message.='DROPBOX: '.$e->getMessage().'<br />';
|
197 |
case 'downloaddropbox': //Download Dropbox Backup
|
198 |
check_admin_referer('download-backup');
|
199 |
if (!class_exists('Dropbox_API'))
|
200 |
+
require_once(realpath(dirname(__FILE__).'/../libs/dropbox.php'));
|
201 |
$jobs=get_option('backwpup_jobs');
|
202 |
$jobid=$_GET['jobid'];
|
203 |
try {
|
204 |
+
$dropbox = new backwpup_Dropbox(BACKWPUP_DROPBOX_APP_KEY, BACKWPUP_DROPBOX_APP_SECRET);
|
205 |
+
$dropbox->setOAuthTokens($jobs[$jobid]['dropetoken'],$jobs[$jobid]['dropesecret']);
|
206 |
+
$filemeta=$dropbox->metadata($_GET['file'],false,1);
|
207 |
header("Pragma: public");
|
208 |
header("Expires: 0");
|
209 |
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
|
210 |
+
header("Content-Type: ".$filemeta['mime_type']);
|
211 |
header("Content-Type: application/force-download");
|
212 |
header("Content-Type: application/octet-stream");
|
213 |
header("Content-Type: application/download");
|
214 |
header("Content-Disposition: attachment; filename=".basename($_GET['file']).";");
|
215 |
header("Content-Transfer-Encoding: binary");
|
216 |
+
header("Content-Length: ".$filemeta['bytes']);
|
217 |
+
$dropbox->download($_GET['file'],true);
|
218 |
die();
|
219 |
} catch (Exception $e) {
|
220 |
die($e->getMessage());
|
pages/header_backwpupeditjob.php
CHANGED
@@ -9,17 +9,15 @@ if (isset($_GET['dropboxauth']) and $_GET['dropboxauth']=='AccessToken') {
|
|
9 |
$backwpup_message='';
|
10 |
if ((int)$_GET['uid']>0 and !empty($_GET['oauth_token'])) {
|
11 |
$reqtoken=get_transient('backwpup_dropboxrequest');
|
12 |
-
if ($reqtoken['
|
13 |
//Get Access Tokens
|
14 |
-
|
15 |
-
require_once(realpath(dirname(__FILE__).'/../libs/Dropbox/autoload.php'));
|
16 |
-
$oauth = new Dropbox_OAuth_Wordpress(BACKWPUP_DROPBOX_APP_KEY, BACKWPUP_DROPBOX_APP_SECRET);
|
17 |
-
$oauth->setToken($reqtoken);
|
18 |
-
$tokens = $oauth->getAccessToken();
|
19 |
-
//Save Tokens
|
20 |
$jobs=get_option('backwpup_jobs');
|
21 |
-
$
|
22 |
-
$
|
|
|
|
|
|
|
23 |
update_option('backwpup_jobs',$jobs);
|
24 |
$backwpup_message.=__('Dropbox authentication complete!','backwpup').'<br />';
|
25 |
} else {
|
@@ -242,16 +240,16 @@ if ((isset($_POST['submit']) or isset($_POST['dropboxauth']) or isset($_POST['dr
|
|
242 |
wp_clear_scheduled_hook('backwpup_cron');
|
243 |
}
|
244 |
|
245 |
-
//get dropbox auth
|
246 |
if (isset($_POST['dropboxauth']) and !empty($_POST['dropboxauth'])) {
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
$
|
251 |
// save oauth_token_secret
|
252 |
-
set_transient('backwpup_dropboxrequest'
|
253 |
//forward to auth page
|
254 |
-
wp_redirect($
|
255 |
}
|
256 |
|
257 |
//make api call to backwpup.com
|
9 |
$backwpup_message='';
|
10 |
if ((int)$_GET['uid']>0 and !empty($_GET['oauth_token'])) {
|
11 |
$reqtoken=get_transient('backwpup_dropboxrequest');
|
12 |
+
if ($reqtoken['oAuthRequestToken']==$_GET['oauth_token']) {
|
13 |
//Get Access Tokens
|
14 |
+
require_once (dirname(__FILE__).'/../libs/dropbox.php');
|
|
|
|
|
|
|
|
|
|
|
15 |
$jobs=get_option('backwpup_jobs');
|
16 |
+
$dropbox = new backwpup_Dropbox(BACKWPUP_DROPBOX_APP_KEY, BACKWPUP_DROPBOX_APP_SECRET);
|
17 |
+
$oAuthStuff = $dropbox->oAuthAccessToken($reqtoken['oAuthRequestToken'],$reqtoken['oAuthRequestTokenSecret']);
|
18 |
+
//Save Tokens
|
19 |
+
$jobs[$jobid]['dropetoken']=$oAuthStuff['oauth_token'];
|
20 |
+
$jobs[$jobid]['dropesecret']=$oAuthStuff['oauth_token_secret'];
|
21 |
update_option('backwpup_jobs',$jobs);
|
22 |
$backwpup_message.=__('Dropbox authentication complete!','backwpup').'<br />';
|
23 |
} else {
|
240 |
wp_clear_scheduled_hook('backwpup_cron');
|
241 |
}
|
242 |
|
243 |
+
//get dropbox auth
|
244 |
if (isset($_POST['dropboxauth']) and !empty($_POST['dropboxauth'])) {
|
245 |
+
require_once (dirname(__FILE__).'/../libs/dropbox.php');
|
246 |
+
$dropbox = new backwpup_Dropbox(BACKWPUP_DROPBOX_APP_KEY, BACKWPUP_DROPBOX_APP_SECRET);
|
247 |
+
// let the user authorize (user will be redirected)
|
248 |
+
$response = $dropbox->oAuthAuthorize(backwpup_admin_url('admin.php').'?page=backwpupeditjob&jobid='.$jobvalues['jobid'].'&dropboxauth=AccessToken&_wpnonce='.wp_create_nonce('edit-job'));
|
249 |
// save oauth_token_secret
|
250 |
+
set_transient('backwpup_dropboxrequest',array('oAuthRequestToken'=>$response['oauth_token'],'oAuthRequestTokenSecret' => $response['oauth_token_secret']),600);
|
251 |
//forward to auth page
|
252 |
+
wp_redirect($response['authurl']);
|
253 |
}
|
254 |
|
255 |
//make api call to backwpup.com
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: backup, admin, file, Database, mysql, Cron, ftp, S3, export, xml, multisite, Rackspace, Cloud, Azure, DropBox, SugarSync, Google, Storage
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.2.1
|
7 |
-
Stable tag: 2.1.
|
8 |
|
9 |
WordPress Backup and more...
|
10 |
|
@@ -52,6 +52,12 @@ Do backups and more for your WordPress Blog.
|
|
52 |
4. Backups Manage Page
|
53 |
|
54 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
= 2.1.4 =
|
56 |
* correct some values on job copy/export
|
57 |
* fixed warning on dropbox upload.
|
4 |
Tags: backup, admin, file, Database, mysql, Cron, ftp, S3, export, xml, multisite, Rackspace, Cloud, Azure, DropBox, SugarSync, Google, Storage
|
5 |
Requires at least: 3.1
|
6 |
Tested up to: 3.2.1
|
7 |
+
Stable tag: 2.1.5
|
8 |
|
9 |
WordPress Backup and more...
|
10 |
|
52 |
4. Backups Manage Page
|
53 |
|
54 |
== Changelog ==
|
55 |
+
= 2.1.5 =
|
56 |
+
* Updated AWS lib to 1.4.4
|
57 |
+
* use my own dropbox lib again and chaned it to new api
|
58 |
+
* Fixed security vulnerability
|
59 |
+
* some littel fixes
|
60 |
+
|
61 |
= 2.1.4 =
|
62 |
* correct some values on job copy/export
|
63 |
* fixed warning on dropbox upload.
|
uninstall.php
CHANGED
@@ -7,7 +7,7 @@ global $wp_version;
|
|
7 |
$blugurl=get_option('siteurl');
|
8 |
if (defined('WP_SITEURL'))
|
9 |
$blugurl=WP_SITEURL;
|
10 |
-
wp_remote_post( '
|
11 |
delete_option('backwpup');
|
12 |
delete_option('backwpup_jobs');
|
13 |
?>
|
7 |
$blugurl=get_option('siteurl');
|
8 |
if (defined('WP_SITEURL'))
|
9 |
$blugurl=WP_SITEURL;
|
10 |
+
wp_remote_post( 'https://api.backwpup.com', array( 'sslverify' => false, 'body'=>array('URL'=>$blugurl,'ACTION'=>'delete'), 'user-agent'=>'BackWPup'));
|
11 |
delete_option('backwpup');
|
12 |
delete_option('backwpup_jobs');
|
13 |
?>
|