,); * $e->logIn(); * $buchungen = $e->getStatements(); * foreach($buchungen as $b) * { * $type = ($b['Amount']['Amount']>0?'Erhalten':'Gezahlt'); * $sym = ($b['Amount']['Amount']>0?'+':'-'); * echo "[$sym] Buchung vom ".$b['BookingDate']."\t".abs($b['Amount']['Amount'])." EUR $type\tText: ".implode($b['TextLines']['Text'],' ')."\n"; * } * disposer = $disposer; $this->pin = $pin; } function getStatements($account=false) { if(!$account) $account = $this->accounts[0]; $answer = $this->makeRequest(' MOBILE no 1337 DE '.$account['AccountNumber'].' '.$account['ProductId']['AccountOwner'].' EASYATW1 14200 0109 EASYBANK '.$account['ProductId']['iBAN'].' '.$account['ProductCode'].' '.$account['ProductId']['ProductDescription'].' '.$account['ProductId']['ProductType'].' '.$this->session.' 0 '.(date("Y")-1).'-01-01+01:00 BOOKING_DATE ALL '); if($answer['OK']) return $answer['OK']['AccountStatementItem']; return false; } function logIn() { $answer = $this->makeRequest(' '.$this->pin.' MOBILE no 1337 DE '.str_pad($this->disposer, 17,'0',STR_PAD_LEFT).' 14200 EASYBANK false '); $this->logindata = $answer; if($answer['OK']) { $this->session = $answer['OK']["ServerSessionID"]; foreach($answer['OK']['Disposer']['Products'] as $product) { $this->accounts[] = $product; } } return $answer; } function makeRequest($xml) { $headers = array( "Content-type: text/xml;charset=\"utf-8\"", "Accept: text/xml", "Cache-Control: no-cache", "Pragma: no-cache", "SOAPAction: urn:selfservicemobile.bawag.com/ws/v0100-draft03/login", "Content-length: ".strlen($xml), ); $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_URL, $this->url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_USERAGENT, 'Dalvik/2.1.0_(Linux;_U;_Android_8.0.0;_ONEPLUS_A3003_Build/OPR6.170623.013) mobileBanking/easybank_5.1 target/PROD platform/phone_6.0'); curl_setopt($ch, CURLOPT_TIMEOUT, 10); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); // converting $response = curl_exec($ch); curl_close($ch); $start = strpos($response,'') + strlen(''); $end = strpos($response,''); $xml = substr($response,$start, ($end-$start) ); return json_decode(json_encode(simplexml_load_string($xml)), true); } }