Mabinogi World Wiki is brought to you by Coty C., 808idiotz, our other patrons, and contributors like you!!
Keep this wiki going by contributing to our Patreon!

PHP Server Statuses?

AJAX AJAX AJAX AJAX AJAX AJAX AJAX AJAX AJAX AJAX etc etc etc (IE, no iframes) ~小太郎 TALKCONTRIBS 2011:06:14:07:38 (Tuesday)

~小太郎 TALK<sub style="margin-left:-26px 23:38, 13 June 2011

HOW ABOUT WE JUST IMPLEMENT SECURE PHP? HOW ABOUT WE JUST IMPLEMENT SECURE PHP? HOW ABOUT WE JUST IMPLEMENT SECURE PHP? HOW ABOUT WE JUST IMPLEMENT SECURE PHP? HOW ABOUT WE JUST IMPLEMENT SECURE PHP? HOW ABOUT WE JUST IMPLEMENT SECURE PHP? etc etc etc

κєνıи тαıĸ«)23:39, 13 June 2011
 

No need for all caps :( ~小太郎 TALKCONTRIBS 2011:06:14:08:17 (Tuesday)

~小太郎 TALK<sub style="margin-left:-26px 00:17, 14 June 2011
 

"AJAX" can also be written as "Ajax."

κєνıи тαıĸ«)16:41, 14 June 2011
 

Now now, kiddies. I think, depending on if IJ has access/can directly edit the Wiki_Home sourcecode, AJAX is the way to go as this will not prevent the page from loading simply because the server status is taking a while.

AJAX code that would REPLACE the current server box. Note that the URL is for EXAMPLE ONLY and would need to be changed to reflect the actual location:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function(){

   $("#response").load("ServerStat/info.php");

}); </script>

Elsewise, I've been looking at: http://www.mediawiki.org/wiki/Extension:Include

This implementation is potentially less secure, but if we configure it to use a regex that ONLY matches the path to the .PHP file, it should be watertight.... IJ, note that the regex would use PERL syntax, so you could fill that bit in yourself.

EITHER WAY, WE ARE NOT PERMANENTLY HOSTING THIS ON MY PERSONAL SITE

SOMEONE NEEDS TO DRAG IJ IN HERE AND MAKE HIM READ WHAT I JUST POSTED ^^^^^ (not it!)

Also, my script now reads from http://wiki.mabinogiworld.com/index.php?title=Automated_Server_Test for its configuration, so we'll need a (slightly) new template on how to edit. Its not really that much different, if you look, you'll see what I mean.

PHP source: http://pastebin.com/gbhFpga6

Xcelled19420:09, 14 June 2011