Advertise Here

Author Topic: A server status? maybe in php format?  (Read 1946 times)

0 Members and 1 Guest are viewing this topic.

Offline Logical

  • SMF For Free Member
  • *
  • Posts: 44
  • Full of Logic
    • View Profile

  • Total Badges: 10
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
A server status? maybe in php format?
« on: March 23, 2009, 04:40:13 pm »
Forum Url: http://runeescape.smfforfree.com
I have been using smfforfree for a few months now, and I made a RSPS, and was wondering if it's possible to post the status without having to post it in my news, because that would get very annoying.
If there is no possible way to do this, can i upload a php script to smfforfree and thenuse that instead? Like maybe even converting it to html, I was told it was possible, but I am not sure. Any help will be much appreciated  :).

If this even matters here is the script I am using, I found a download and here is what i got:

Code: [Select]
<?php
//Web Server Status v 1.4, Copyright 2002 By Ryan Schwiebert, visit http://www.schwebdesigns.com/
//This script may be freely distributed providing all copyright headers are kept intact. 

//Concept from:
//Abax Server Status v1.04, Copyright 2002 By Nathan Dickman, visit http://www.NathanDickman.com/
//Location of the live or dead server images

//Please change to your server specifications
$live "http://www.schwebhost.com/status/live.gif";
$dead "http://www.schwebhost.com/status/dead.gif";

//The status checking script
//meddle at your own risk!
//check for port number, default is 80
$link $_GET['link'].":";
$s_link str_replace("::"":"$link);
list(
$addr,$port)= explode (':',"$s_link");
if (empty(
$port)){
$port 43594;
}
//Test the server connection
$churl = @fsockopen(server($addr), $port$errno$errstr20);
             if (!
$churl){
 //echo $errstr;
                
header("Location: $dead");
                }
             else {
             
  header("Location: $live");             
  }
function 
server($addr){
         if(
strstr($addr,"/")){$addr substr($addr0strpos($addr"/"));}
         return 
$addr;
}
?>


So if that means anything, what is wrong?
Again, thanks for any help.

-Logical
Logical full of logic.

Into RuneScape private servers? try out www.runeescape.smfforfree.com
Or you can try the tk link (same site) www.rune-escape.tk

Offline SMF For Free

  • Administrator
  • *
  • Posts: 7304
    • View Profile
    • SMF For Free

  • Total Badges: 38
    Badges: (View All)
    Quick Poster Tenth year Anniversary Spammer 25 Posts in one day Nineth year Anniversary Eighth year Anniversary
Re: A server status? maybe in php format?
« Reply #1 on: March 23, 2009, 06:42:56 pm »
Php code will not work and is not supported.
SMF For Free-Free Simple Machines Forum hosting.
Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline Logical

  • SMF For Free Member
  • *
  • Posts: 44
  • Full of Logic
    • View Profile

  • Total Badges: 10
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: A server status? maybe in php format?
« Reply #2 on: March 24, 2009, 12:26:12 am »
Oh ok, thank you.
Logical full of logic.

Into RuneScape private servers? try out www.runeescape.smfforfree.com
Or you can try the tk link (same site) www.rune-escape.tk

Offline Colette Brunel

  • SMF For Free Sr. Member
  • *
  • Posts: 424
    • View Profile

  • Total Badges: 17
    Badges: (View All)
    Poll Voter Level 4 Fourth year Anniversary Windows User Topic Starter
Re: A server status? maybe in php format?
« Reply #3 on: March 24, 2009, 01:46:56 pm »
That PHP snippet actually isn't well coded... it assumes things are clean.

Regardless, you can't upload your own scripts as gamer said. However you *could* perhaps rewrite it in JavaScript, and then append the RSS with a status as all forums have a live RSS feed.

Offline Logical

  • SMF For Free Member
  • *
  • Posts: 44
  • Full of Logic
    • View Profile

  • Total Badges: 10
    Badges: (View All)
    Topic Starter Combination Level 2 Level 1 10 Posts
Re: A server status? maybe in php format?
« Reply #4 on: March 24, 2009, 02:15:17 pm »
LOL I have no idea how to do what you just said  :P
Logical full of logic.

Into RuneScape private servers? try out www.runeescape.smfforfree.com
Or you can try the tk link (same site) www.rune-escape.tk

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
1206 Views
Last post March 12, 2008, 07:31:20 pm
by GamesGalore™
11 Replies
15807 Views
Last post November 16, 2009, 04:43:16 am
by Coder4ever
16 Replies
17051 Views
Last post May 12, 2009, 09:03:08 am
by Rath
2 Replies
4876 Views
Last post January 15, 2009, 02:57:39 pm
by php coder
0 Replies
1342 Views
Last post June 23, 2011, 08:05:27 pm
by Rizerstif