*/
class Diasphp {
+ private $cookiejar;
+
function __construct($pod) {
$this->token_regex = '/content="(.*?)" name="csrf-token/';
$this->cookiejar = tempnam(sys_get_temp_dir(), 'cookies');
}
+ function __destruct() {
+ if (file_exists($this->cookiejar))
+ unlink($this->cookiejar);
+ }
+
function _fetch_token() {
$ch = curl_init();