+ /**
+ * get the csrf_token
+ *
+ * @return string
+ */
+ private function getToken () {
+ $path = 'html/content/overview/index.html?lang=de';
+ $fields = array();
+ $cookie = 'challengev='.$this->challenge.'; '.$this->session;
+ $data = $this->sentRequest($path, $fields, $cookie);
+
+ if (empty($data['body'])) {
+ throw new Exception('unable to get csrf_token');
+ }
+
+ $a = explode('csrf_token = "', $data['body']);
+ $a = explode('";', $a[1]);
+
+ if (isset($a[0]) && !empty($a[0])) {
+ return $a[0];
+ }
+ else {
+ throw new Exception('unable to get csrf_token');
+ }
+ }
+