set_timeout(120); $http->set_cookie('D2', 'a%3A4%3A%7Bi%3A0%3Bs%3A4%3A%221456%22%3Bi%3A1%3Bs%3A40%3A%22ca313afe9822b1d172ce660758e915fe81810780%22%3Bi%3A2%3Bi%3A1359068654%3Bi%3A3%3Bi%3A2%3B%7D'); $http->set_cookie('PHPSESSID', 'a2bb4a7485eaba91b9d8db6aafd8ec5d'); #Cookie: D2=; PHPSESSID=a2bb4a7485eaba91b9d8db6aafd8ec5d $data = $http->get_content(); $data = trim(preg_replace('<>', '', $data)); // remove message, else it will break gzinflate if (!@gzinflate($data)) { $cprs = "raw HTML stream"; } else { $data = gzinflate($data); $cprs = "GZip compressed stream"; } if (!xml_parse($xml_parser, $data, true)) return "Error getting XML data from ".$fetchurl."

"; xml_parser_free($xml_parser); if (config::get('fetch_verbose') ) { if ($x) $html .= "
".$x." kills added from feed: ".$url."
".$str."
(".$cprs.")


"; else $html .= "
No kills added from feed: ".$url."
".$str."
(".$cprs.")


"; } else { if ($x) $html .= "
".$x." kills added from feed: ".$url." (".$cprs.")

"; else $html .= "
No kills added from feed: ".$url." (".$cprs.")

"; } return $html; } function startElement($parser, $name, $attrs) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) $tag = $name; elseif ($name == "ITEM") $insideitem = true; } function endElement($parser, $name) { global $insideitem, $tag, $title, $description, $link, $html, $x, $uurl; if ($name == "ITEM") { if ( isset( $description ) ) { $parser = new Parser( $description ); $killid = $parser->parse( true ); if ( $killid == 0 || $killid == -1 || $killid == -2 ) { if ( $killid == 0 && config::get('fetch_verbose') ) $html .= "Killmail is malformed.
"; if ( $killid == -2 && config::get('fetch_verbose') ) $html .= "Killmail is not related to ".KB_TITLE.".
"; if ( $killid == -1 && config::get('fetch_verbose') ) $html .= "Killmail already posted dupeid_."\">here.
"; } else { $qry = new DBQuery(); $qry->execute( "insert into kb3_log values( ".$killid.", '".KB_SITE."','".$_SERVER['REMOTE_ADDR']."',now() )" ); $html .= "Killmail succsessfully posted here.
"; if (class_exists('Comments') && config::get('fetch_comment')) { // for the Eve-Dev Comment Class $comments = new Comments($killid); $comments->addComment("liq's feed syndication", config::get('fetch_comment')." mail fetched from: ".$uurl.")"); } if (class_exists('Comment') && config::get('fetch_comment')) { // for the D2 Killboard Comment Class $comment = new Comment($killid); $comment->postComment(config::get('fetch_comment')." \n\n\n mail fetched from:\n ".$uurl."", "liquidism"); } $x++; } } $title = ""; $description = ""; $link = ""; $insideitem = false; } } function characterData($parser, $data) { global $insideitem, $tag, $title, $description, $link; if ($insideitem) { switch ($tag) { case "TITLE": $title .= $data; break; case "DESCRIPTION": $description .= $data; break; case "LINK": $link .= $data; break; } } } } ?>