diff options
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']); |