From 84fc0b30493e9b8081898ec48451cec06a2cf2bc Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Mon, 21 Dec 2009 06:16:41 +0000 Subject: Used the 'file' function to work around an 'include' limitation. Regular expressions extract the IP/Port and display them separately. Some horizontal alignment code needs to be added. git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@387 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- modules/tsviewer/index.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'modules/tsviewer/index.php') diff --git a/modules/tsviewer/index.php b/modules/tsviewer/index.php index afbc83f..d243fba 100644 --- a/modules/tsviewer/index.php +++ b/modules/tsviewer/index.php @@ -23,22 +23,24 @@ if(!defined("MODULE_FILE")) return; } +$ts = implode('',file("http://www.tsviewer.com/ts_viewer_pur.php?ID=902437&bg=&type=8f8f8f&type_size=11&type_family=5&info=1&channels=1&users=1&type_s_color=000000&type_s_weight=bold&type_s_style=normal&type_s_variant=normal&type_s_decoration=none&type_s_color_h=525284&type_s_weight_h=bold&type_s_style_h=normal&type_s_variant_h=normal&type_s_decoration_h=underline&type_i_color=000000&type_i_weight=normal&type_i_style=normal&type_i_variant=normal&type_i_decoration=none&type_i_color_h=525284&type_i_weight_h=normal&type_i_style_h=normal&type_i_variant_h=normal&type_i_decoration_h=underline&type_c_color=000000&type_c_weight=normal&type_c_style=normal&type_c_variant=normal&type_c_decoration=none&type_c_color_h=525284&type_c_weight_h=normal&type_c_style_h=normal&type_c_variant_h=normal&type_c_decoration_h=underline&type_u_color=000000&type_u_weight=normal&type_u_style=normal&type_u_variant=normal&type_u_decoration=none&type_u_color_h=525284&type_u_weight_h=normal&type_u_style_h=normal&type_u_variant_h=normal&type_u_decoration_h=none")); + +$tmp = $ts; +$tmp = strip_tags($tmp); +preg_match("/(\d+).(\d+).(\d+).(\d+):(\d+)/", $tmp, $ip); + OpenTable(); -echo "
How to Connect

IP: 64.214.185.50:9004

Password: Garand

"; +echo "
How to Connect
+

IP: $ip[0]

Password: Garand

"; CloseTable(); - OpenTable(); -echo "
Teamspeak Server
"; +echo "
Teamspeak Server
"; /*echo "
\n";*/ //echo "
\n"; -echo "
"; - -$ts = implode('',file("http://www.tsviewer.com/ts_viewer_pur.php?ID=902437&bg=&type=8f8f8f&type_size=11&type_family=5&info=1&channels=1&users=1&type_s_color=000000&type_s_weight=bold&type_s_style=normal&type_s_variant=normal&type_s_decoration=none&type_s_color_h=525284&type_s_weight_h=bold&type_s_style_h=normal&type_s_variant_h=normal&type_s_decoration_h=underline&type_i_color=000000&type_i_weight=normal&type_i_style=normal&type_i_variant=normal&type_i_decoration=none&type_i_color_h=525284&type_i_weight_h=normal&type_i_style_h=normal&type_i_variant_h=normal&type_i_decoration_h=underline&type_c_color=000000&type_c_weight=normal&type_c_style=normal&type_c_variant=normal&type_c_decoration=none&type_c_color_h=525284&type_c_weight_h=normal&type_c_style_h=normal&type_c_variant_h=normal&type_c_decoration_h=underline&type_u_color=000000&type_u_weight=normal&type_u_style=normal&type_u_variant=normal&type_u_decoration=none&type_u_color_h=525284&type_u_weight_h=normal&type_u_style_h=normal&type_u_variant_h=normal&type_u_decoration_h=none")); +echo "
"; echo $ts; - echo "
\n"; CloseTable(); - ?> -- cgit