This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
plugins:remotebridge [2014/01/29 10:52] thecry [Encrypted array variables which are available / required] |
plugins:remotebridge [2014/08/06 11:58] (current) thecry [RemoteBridge URL] |
||
---|---|---|---|
Line 18: | Line 18: | ||
==== RemoteBridge URL ==== | ==== RemoteBridge URL ==== | ||
- | * http://adminurl.tld/remotebridge.php | + | <code>http(s)://admin.myserver.tld/remotebridge.php</code> |
- | or | + | |
- | * http://adminurl.tld/remotebridge.php | + | |
==== How to send data to the remote bridge (example) ==== | ==== How to send data to the remote bridge (example) ==== | ||
- | https://github.com/i-MSCP/plugins/tree/master/RemoteBridge#how-to-send-data-to-the-remote-bridge-example | + | <code>function dataEncryption($dataToEncrypt, $ResellerUsername) { |
+ | return strtr(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($ResellerUsername), serialize($dataToEncrypt), MCRYPT_MODE_CBC, md5(md5($ResellerUsername)))), '+/=', '-_,'); | ||
+ | } | ||
+ | $bridgeKey = ''; | ||
+ | $ResellerUsername = ''; | ||
+ | $dataToEncrypt = array( | ||
+ | 'action' => '', | ||
+ | 'reseller_username' => $ResellerUsername, | ||
+ | 'reseller_password' => '', | ||
+ | 'bridge_key' => $bridgeKey, | ||
+ | 'hosting_plan' => '', | ||
+ | 'admin_pass' => '', | ||
+ | 'email' => '', | ||
+ | 'domain' => '' | ||
+ | ); | ||
+ | |||
+ | $ch = curl_init('http(s)://admin.myserver.tld/remotebrigde.php'); | ||
+ | curl_setopt($ch, CURLOPT_POST, 1); | ||
+ | curl_setopt($ch, CURLOPT_POSTFIELDS, 'key='.$bridgeKey.'&data='.dataEncryption($dataToEncrypt, $ResellerUsername)); | ||
+ | curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | ||
+ | |||
+ | $httpResponse = curl_exec($ch); | ||
+ | echo $httpResponse; | ||
+ | curl_close($ch);</code> | ||
==== Post data variables which are available / required ==== | ==== Post data variables which are available / required ==== | ||
=== key (required) === | === key (required) === | ||
Line 142: | Line 163: | ||
=== 8. alias_domains === | === 8. alias_domains === | ||
* (must be an array), array('alias1.tld', 'alias2.tld') | * (must be an array), array('alias1.tld', 'alias2.tld') | ||
+ | |||
+ | ==== Encrypted array variables which are available / required ==== | ||
+ | * fname: first name | ||
+ | * lname: last name | ||
+ | * firm: company | ||
+ | * zip: zipcode | ||
+ | * city: city | ||
+ | * state: state | ||
+ | * country: country | ||
+ | * phone: phone number | ||
+ | * fax: fax number | ||
+ | * street1: street | ||
+ | * street2: additional street informations | ||
+ | * gender: value can be "F=female, M=male" | ||
+ | |||
==== KNOWN ISSUES ==== | ==== KNOWN ISSUES ==== |