]> git.mxchange.org Git - friendica-addons.git/blobdiff - diaspora/diasphp.php
RU translation diaspora addon THX Alexander An
[friendica-addons.git] / diaspora / diasphp.php
index 589a581010495aaf6b9bb9ac86edc878875d0eca..f48933a62115e32b85b636732bcdba06a2279c36 100644 (file)
@@ -5,11 +5,18 @@
  */
 
 class Diasphp {
+       private $cookiejar;
+
        function __construct($pod) {
                $this->token_regex = '/content="(.*?)" name="csrf-token/';
 
                $this->pod = $pod;
-               $this->cookiejar = tempnam(sys_get_temp_dir(), 'cookies');
+               $this->cookiejar = tempnam(get_temppath(), 'cookies');
+       }
+
+       function __destruct() {
+               if (file_exists($this->cookiejar))
+                       unlink($this->cookiejar);
        }
 
        function _fetch_token() {