The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Server Status Script

5 posters

Go down

In progress Server Status Script

Post by Metorrite January 28th 2013, 4:46 pm

hi i want to have a script where it sends a request to my server and if it equals true than it will say its online if not it says its offline so i don't have to manually change it.
this is what im assuming it would look like.

<script>
*this is where it would send a request to the server and make 'server' equal true or false.*
if(server = true) {
<marquee behavior="scroll" direction="left" scrollamount="3"><font size=3>The server is </fontsize><font color=green><font size=4>ONLINE</fontsize></fontcolor></marquee>
} else {
<marquee behavior="scroll" direction="left" scrollamount="3"><font size=3>The server is </fontsize><font color=red><font size=4>OFFLINE</fontsize></fontcolor></marquee>
}
</script>

i would greatly appreciate it if anyone would know how to do it if it helps any it might be easier to make it work like www.canyouseeme.org does and just check the port to see if it responds. thanks in advanced. Smile
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite January 29th 2013, 3:45 am

when "server;" is equal to true meaning that the server its sending a request to is online then i want it to make "server" equal true and do this

<marquee behavior="scroll" direction="left" scrollamount="3"><font size=3>The server is </fontsize><font color=green><font size=4>ONLINE</fontsize></fontcolor></marquee>

but when it sends a request and cannot acces it i want it to say this

<marquee behavior="scroll" direction="left" scrollamount="3"><font size=3>The server is </fontsize><font color=red><font size=4>OFFLINE</fontsize></fontcolor></marquee>

im not sure how to do it though.
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite February 1st 2013, 4:38 pm

bump, still need helpi can try explaining it again if you dont understand my question.
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by levy February 2nd 2013, 12:51 am

Is more php because ,when you press a "button" for exemple ,your server status will look offline ,that you want to explain ,yes ?
levy
levy
Hyperactive

Male Posts : 2632
Reputation : 350
Language : English, Romanian
Location : Romania

https://portofolio.goodforum.net/

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite February 4th 2013, 9:04 pm

i guess it kind of hard fo rme to explain maybe it might be better like this, i want it to be able to tell me whether or not the server is online without me having to change it manually. but i also want it to do this if it is online
Code:
<marquee behavior="scroll" direction="left" scrollamount="3"><font size=3>The server is </fontsize><font color=green><font size=4>ONLINE</fontsize></fontcolor></marquee>
and if its not online i want it to do this
Code:
<marquee behavior="scroll" direction="left" scrollamount="3"><font size=3>The server is </fontsize><font color=green><font size=4>ONLINE</fontsize></fontcolor></marquee>
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite February 4th 2013, 9:08 pm

its a game server i am running off of my computer and i want the text scrolling across the home page of my forum, whats JSON?
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite February 4th 2013, 9:16 pm

like where you actually play the game? because the server is off right now and i cant turn it on, i was thinking that there was a way to check if something is running on my computer and a specific port like it does on www.canyouseeme.org
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite February 5th 2013, 4:48 pm

im kind of confused of what your asking, sorry if im not understanding let me try again. you need a website that the server is running on correct? if so it doesnt run on a website i run it off my pc or a vps (virtual private server). Im just not understand what you mean when you say you need the website.

extra information if you need it, not sure if its going to help much.
Spoiler:

EDIT: thanks so much for helping me rideem i really appreciate your help so far Smile
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by LGforum February 7th 2013, 12:15 am

In order for a server to contact the internet or transfer any information over the internet, it must itself be connected to the internet and have an address. Whether it is a designated domain or simply an IP address, it must be online with an address to point to it.

A server can not equal 'true', that's like saying a computer can equal '23', its just a random statement.

You must write a script in order to reply to the HTTP request with a response. That response could simply say 'true' if you wanted.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite February 7th 2013, 4:35 pm

ok i think i understand, im using no-ip the thing i believe you are asking for rideem is the ip it is using, its meteorscape.malware-site.www

EDIT: thank you lg forum for explaining that it really helped me understand how it works thanks.
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by Sanket February 7th 2013, 7:40 pm

Topic Solved & Locked
Sanket
Sanket
ForumGuru

Male Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai

Back to top Go down

In progress Re: Server Status Script

Post by Jophy February 8th 2013, 5:26 pm

Moved back upon author's request.
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite February 8th 2013, 8:50 pm

Jophy wrote:Moved back upon author's request.
thank you.
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

In progress Re: Server Status Script

Post by Metorrite February 8th 2013, 9:09 pm

hi i want to have a script where it sends a request to my server and it will determine if it is online or not - if it is online it will show it on my homepage if not it says its offline so i don't have to manually change it.
avatar
Metorrite
Forumember

Posts : 52
Reputation : 1
Language : English | HTML | C++

http://meteorscape.forumotion.com

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum