diff options
author | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2019-11-13 21:23:25 +0100 |
---|---|---|
committer | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2019-11-13 21:23:25 +0100 |
commit | eb34b989bb99ac8b4544928a32ba1db65d9f45ab (patch) | |
tree | add6c3e3c3d2672d1dc1bb9c5ea52a3f383eb8e7 /main.php | |
parent | pozabu verzijo (diff) | |
download | gimsisextclient-eb34b989bb99ac8b4544928a32ba1db65d9f45ab.tar gimsisextclient-eb34b989bb99ac8b4544928a32ba1db65d9f45ab.tar.gz gimsisextclient-eb34b989bb99ac8b4544928a32ba1db65d9f45ab.tar.bz2 gimsisextclient-eb34b989bb99ac8b4544928a32ba1db65d9f45ab.tar.lz gimsisextclient-eb34b989bb99ac8b4544928a32ba1db65d9f45ab.tar.xz gimsisextclient-eb34b989bb99ac8b4544928a32ba1db65d9f45ab.tar.zst gimsisextclient-eb34b989bb99ac8b4544928a32ba1db65d9f45ab.zip |
Diffstat (limited to 'main.php')
-rw-r--r-- | main.php | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -54,7 +54,7 @@ Errors: class gimsisextClient { private $username; private $password; - public $version = array(0, 9, 0); + public $version = array(0, 9, 1); private $programname = "gimsisextclient"; private $programdomain = 'gimsisextclient.gimb.tk'; private $cookiedir; // set at runtime, ker je get_curerent_user, v login() @@ -504,14 +504,11 @@ Errors: curl_setopt($ch, CURLOPT_URL, $this->gimsisextmodsporocilo."?params=IdMsg%3D".explode("|", $id)[0]); curl_setopt($ch, CURLOPT_POST, 0); $sporocilo_output = curl_exec($ch); - file_put_contents("/tmp/as.txt", $sporocilo_output); - $xmlDoc = new DOMDocument(); - $xmlDoc->loadHTML( $sporocilo_output ); - $textarea = DOMinnerHTML($xmlDoc->getElementById( "ctl00_ModalMasterBody_edtBesediloExt" )); + file_put_contents("/tmp/as2.txt", $sporocilo_output); $zadeva = html_entity_decode(get_string_between($sporocilo_output, '<input name="ctl00$ModalMasterBody$edtZadeva" type="text" value="', '" id="ctl00_ModalMasterBody_edtZadeva" />')); - $telo = html_entity_decode(html_entity_decode(get_string_between($textarea, "</span></p><p>", "</p>\n"))); - $posiljatelj = html_entity_decode(html_entity_decode(get_string_between($textarea, "><b>Od</b>: ", "<br /><b>Poslano</b>: "))); // ne trudi se za prejemnika, gimsisglitch(C)12 - $datumincas = get_string_between($textarea, "<br /><b>Poslano</b>: ", "<br /><b>Za</b>: "); // pazi, tale je za ljudi + $telo = html_entity_decode(html_entity_decode(get_string_between($sporocilo_output, "</span></p>", "</textarea>"))); + $posiljatelj = html_entity_decode(html_entity_decode(get_string_between($sporocilo_output, "><b>Od</b>: ", "<br /><b>Poslano</b>: "))); // ne trudi se za prejemnika, gimsisglitch(C)12 + $datumincas = get_string_between($sporocilo_output, "<br /><b>Poslano</b>: ", "<br /><b>Za</b>: "); // pazi, tale je za ljudi $cas = explode(":", end(explode(" ", $datumincas))); $datum['dan'] = intval(substr(explode(" ", $datumincas)[0], 0, -1)); // da ni . $datum['mesecbeseda'] = explode(" ", $datumincas)[1]; @@ -786,7 +783,7 @@ Errors: } return $ocene; } - public function fetchvsasporocila($katera = 0) { + public function fetchvsasporocila($katera = 0) { // prepočasi $msgs = null; foreach($this->fetchsporocilaseznam($katera) as $mesidz) { $msgs[] = $this->fetchsporocilo($mesidz['id']); |