V1.15 -> 240208 Die Logindaten und der Keks werden jetzt von der php Datei aus im Unterverzeichnis /data gespeichert (muss von Hand erstellt werden)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/*
|
||||
Nenninger N-Tools.de
|
||||
Version 1.14
|
||||
Version 1.15
|
||||
|
||||
*/
|
||||
|
||||
@@ -116,7 +116,7 @@ class UUID {
|
||||
|
||||
|
||||
class hermineConnect{
|
||||
private $VERSION = '1.14';
|
||||
private $VERSION = '1.15';
|
||||
private $MACHINENAME = 'default';
|
||||
private $hermineServer = 'https://api.thw-messenger.de';
|
||||
private $connectorID = "";
|
||||
@@ -211,8 +211,8 @@ class hermineConnect{
|
||||
'Expect:'
|
||||
));
|
||||
curl_setopt( $this->cURL, CURLOPT_COOKIESESSION, true );
|
||||
curl_setopt( $this->cURL, CURLOPT_COOKIEJAR, './hermineConnectCookie.txt' );
|
||||
curl_setopt( $this->cURL, CURLOPT_COOKIEFILE, './hermineConnectCookie.txt' );
|
||||
curl_setopt( $this->cURL, CURLOPT_COOKIEJAR, __DIR__.'/data/hermineConnectCookie.txt' );
|
||||
curl_setopt( $this->cURL, CURLOPT_COOKIEFILE, __DIR__.'/data/hermineConnectCookie.txt' );
|
||||
curl_setopt( $this->cURL, CURLINFO_HEADER_OUT, true);
|
||||
|
||||
if(isset($this->debug))
|
||||
@@ -589,8 +589,8 @@ class hermineConnect{
|
||||
public function login($_saveLogin=false){
|
||||
$savelogin = new stdClass();
|
||||
if($_saveLogin){
|
||||
if(file_exists('./hermineConnectLogin.dat')){
|
||||
$savelogin = json_decode(file_get_contents('./hermineConnectLogin.dat'));
|
||||
if(file_exists(__DIR__.'/data/hermineConnectLogin.dat')){
|
||||
$savelogin = json_decode(file_get_contents(__DIR__.'/data/hermineConnectLogin.dat'));
|
||||
$this->client_key = $savelogin->ClientKey;
|
||||
$this->connectorID = $savelogin->DeviceId;
|
||||
$this->user_id = $savelogin->UserID;
|
||||
@@ -625,7 +625,7 @@ class hermineConnect{
|
||||
$savelogin->ClientKey = $this->client_key;
|
||||
$savelogin->DeviceId = $this->connectorID;
|
||||
$savelogin->UserID = $this->user_id;
|
||||
file_put_contents('./hermineConnectLogin.dat',json_encode($savelogin));
|
||||
file_put_contents(__DIR__.'/data/hermineConnectLogin.dat',json_encode($savelogin));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
!!! DAS SCRIPT IST NUR IN EINER GESICHERTEN UMGEBUNG ZU NUTZEN !!!
|
||||
Das Speichern von Zugangsdaten auf öffentlichen Servern stellt ein hohes Risiko da!
|
||||
|
||||
Nenninger N-Tools.de
|
||||
|
||||
@@ -9,6 +11,7 @@
|
||||
* 31.10.2023 -> Fehler beim speichern der Logins gefixt
|
||||
* V1.13 26.11.2023 -> open_conversation eingebaut
|
||||
* V1.14 -> 231220 sendmsg: Text wird jetzt als Markdown formatiert markiert (Parameter "metainfo")
|
||||
* V1.15 -> 240208 Die Logindaten und der Keks werden jetzt von der php Datei aus im Unterverzeichnis /data gespeichert (muss von Hand erstellt werden)
|
||||
|
||||
hermine@THW PHPConnector
|
||||
inspiriert von https://gitlab.com/aeberhardt/stashcat-api-client
|
||||
|
||||
Reference in New Issue
Block a user