The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting up server status
Author Message
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #11
RE: Setting up server status
well good luck getting anyone there to show you how to make calls to the DB and how to populate it

if you had no intention of learning spherescript (even the very small bit needed to insert things into a DB) then i hope you plan on learning C#, and i hope you have a lot of time to do so, and good luck getting anyone from runuo to show you anything to do with the DB or website lmao

its really not that hard to do with sphere, of course you will have to learn how to script ffs, if u think u can go crying to runuo and they will hand you everything you want without you having to learn anything then you may as well just do something else, play checkers perhaps. . . .

[Image: matts_siggy.gif]
06-25-2013 08:57 AM
Find all posts by this user Like Post Quote this message in a reply
RanXerox
Master
**

Posts: 550
Likes Given: 1
Likes Received: 12 in 9 posts
Joined: Dec 2010
Reputation: 19



Post: #12
RE: Setting up server status
There is a built-in web server in sphere that you can enable using the following setting in sphere.ini:

Code:
// Use the built in http server
// 0 - disable http server and webpage generation
// 1 - disable http server and enable webpage generation
// 2 - enable http server and webpage generation (default)
UseHttp=1

You can define some more behavior for that webserver using these settings:

Code:
///////////////////////////////////////////////////////////////
//////// Webpage Settings
///////////////////////////////////////////////////////////////

// Note, that you can catch error codes by creating sphere404.htm and so on
// for all HTTP error codes sphere support.

[WEBPAGE 1]
// Determines what html file is used as base for the status page
WebPageSrc=scripts\web\spherestatusbase.html
// Determines where the status page is saved
WebPageFile=scripts\web\status.html
// In seconds, how often the status file is updated
WebPageUpdate=60
// Required PLevel to view this page (0 = anyone, 6 = admins only)
PLevel=0

If you want those html files to look different, then you need some other webserver to fetch and rewrite the content however you desire. Here is a primitive php sample for you to start from (note "10.0.1.100" is the internal IP of the sphereserver, and "athlore" is the name of the shard):

PHP Code:
<?php

  
print "The following players are in-game right now!  If you want to see what they are up to then you need to start playing!<br>";
  print 
"<table width='100%'>";
  print 
"<tr><th colspan=2><center>Sphere</center></th></tr>";
  print 
"<tr><td>";
  
$url "http://10.0.1.100/athlore/status.html";
  
$str file_get_contents($url);
  print 
$str;
  print 
"</td></tr>";
  print 
"</table>";

?>

If you don't know php, get a book from Amazon...

The web\spherestatusbase.html in that previous example was edited to look like this:

Code:
<table border="1" width="100%">
  <tr>
    <th><strong>Name</strong></th>
    <th><strong>Location</strong></th>
  </tr>
  <script language="Sphere">CLIENTLIST <tr %LISTCOL%><td>%NAME%</td><td>%REGION.NAME%</td></tr></script>
  <tr><td colspan="2"><em>Last updated:</em> %RTIME%</td></tr>
</table>

In that example, you can see that some primitive sphere script can be embedded. It may be possible to do more complex things with it, but I haven't really tried to push that envelope... Good luck!

There is no simple way to query sphereserver to find out what your players are wearing, so that is why people are suggesting triggers to write that sort of detail to a database etc.
(This post was last modified: 06-25-2013 04:34 PM by RanXerox.)
06-25-2013 10:19 AM
Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #13
RE: Setting up server status
Wasn't going to run to runuo just wanted some help instead of someone acting like an ass. thank you ran!
06-25-2013 10:46 AM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #14
RE: Setting up server status
@Ran

i think you meant 10.0.1.100 is the internal IP

@Leon, i cant find one post where ppl were not helping you, me and the other guy assumed you knew how to script triggers, and was giving you options to load w/e data you wanted or needed into a table, via a trigger, admittedly my wife did throw in the lesbians and ham thing, but even then i said something about populating the tables, no one was acting like an ass until you brought up going to runuo

next time i suggest you give us some details on what you are capable of doing rather then getting all bent out of shape when ever we guess you already know how to do some simple things, it will allow us to help you better and explain things to you on your level.

btw, there is a really good tutorial on basic sphere scripting features on the sphere wiki, pretty much everything Ran told you could had been found there without very much effort, and would had saved you alot of time, not to mention knowledge on things you are asking about including DB functions and triggers.

again, more details and level of capabilities in your post will get you alot farther here then popping off about runuo, but i will admit when i read that you thought you would get all the help there you didnt get here i had a long good laugh lol

[Image: matts_siggy.gif]
06-25-2013 01:58 PM
Find all posts by this user Like Post Quote this message in a reply
pinku
Journeyman
*

Posts: 118
Likes Given: 4
Likes Received: 2 in 2 posts
Joined: Apr 2013
Reputation: 4



Post: #15
RE: Setting up server status
Hey, if it's not a problem, I'll get the thread going...

I have a doubt (and I can't test it now), but if I want to setup more pages, besides the spherestatus, all I have to do is specify on spherewebs?

for example:

Code:
[WEBPAGE example]
WebPageSrc=web/example.html
WebPageFile=site/example.html

Or did I completely miss the point here?
(This post was last modified: 06-25-2013 02:45 PM by pinku.)
06-25-2013 02:45 PM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #16
RE: Setting up server status
yes (i assume as it appears to run like a defname), and there are certain parameters you can use to pull info, like ran said "%RTIME%", "%NAME%" and "%REGION.NAME%", im not sure what all you can get however. . . .

u can use the built in server, or use your own, in my experience you should prolly use your own so u can take advantage of other features like php 5.

[Image: matts_siggy.gif]
(This post was last modified: 06-25-2013 09:13 PM by Rattlehead.)
06-25-2013 09:12 PM
Find all posts by this user Like Post Quote this message in a reply
Leonidas
Master
**

Posts: 277
Likes Given: 3
Likes Received: 13 in 12 posts
Joined: May 2013
Reputation: 1



Post: #17
RE: Setting up server status
(06-24-2013 06:21 PM)Rattlehead Wrote:  make a table, put ham on that table. Get a group of Lesbians to eat the ham, once they have consumed said ham ship Lesbians off to Europe for more mint sauce and pudding.

then load ur table with triggers, then call the tables with php.

really not too hard, cept the lesbians, that may be hard (excuse the wife she edited when i was outside lol)

Guess that's help? hmm guess i should try that then
06-27-2013 07:32 AM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #18
RE: Setting up server status
"then load ur table with triggers, then call the tables with php."

notice here i state to load your table with triggers, then call the tables using PHP? yes, this helps you should try that, thats how its done. . . .

"really not too hard, cept the lesbians, that may be hard (excuse the wife she edited when i was outside lol)"

notice here i stated that my wife edited my post while i was outside? did this really get you so bent out of shape you turned into a 5 year old about it? the post still contained relevant info and my wife was just playing around, i figured it was all in good fun and that ppl reading it wouldnt take the lesbians and the ham seriously, i thought it was obvious the lesbians and ham didnt have anything to do with triggers or php.

bottom line here is, whether you have a sense of humor or not, there were 2 of us giving you information on how you should get info to your website, and apparently the only thing you picked up on was the joke my wife edited into my post then went into tantrum mode instead of picking up on all the other things we were telling you to do, didnt ask for more detailed information on what we were talking about or even tell us you had no idea how to do anything that we were telling you to do, which would had allowed us to help you more, the only thing you focused on was a single sentence that had nothing to do with the relevant information.

if a single sentence in my post offended you so much that you ignored all the other information being offered, then accept my apologies, however the temper tantrum you threw over it was far more ridiculous and asinine then a small edit from my wife, ill do my best to keep her off my post to you so that you arent so easily offended in the future, wouldnt want a small joke getting completely blown out of proportion and ruin it for ppl who do have a sense of humor Wink

[Image: matts_siggy.gif]
06-27-2013 08:55 AM
Find all posts by this user Like Post Quote this message in a reply
SukmiLongHeart
Apprentice
*

Posts: 43
Likes Given: 13
Likes Received: 5 in 3 posts
Joined: Sep 2013
Reputation: 0

Uberon

Post: #19
RE: Setting up server status
+1 on this.

Make a comprensive tutorial for this guys! There's nothing on the wiki about it.

Grts

[Image: Bannergateway.png]
06-13-2014 03:02 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #20
RE: Setting up server status
Sphere already have a working webpage status generation, just enable some webpage settings on sphere.ini and use http://serverIP:serverPORT on your browser (eg: http://12.34.56.78:2593). If you just want show some basic info, this will do the job

or if you have some advanced skills on MySQL + PHP, you can export sphere data to SQL and then read it using PHP.
I only recommend this advanced method if you really need something more advanced, like a server status integrated on another account/player info database, etc. If you don't need it, the basic sphere webpage will be much more simple and easy to use
06-13-2014 03:05 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)