Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Is it possible to connect to SS via PHP?
Goto page Previous  1, 2
 
Post new topic   Reply to topic Printable version
 View previous topic  cccc for PSP Post :: Post First c program  View next topic  
Author Message
k0zy
Server Help Squatter


Gender:Gender:Male
Joined: Jan 11 2003
Posts: 571
Location: Germany
Offline

PostPosted: Mon Apr 24, 2006 7:18 am    Post subject: Reply to topic Reply with quote

Smong wrote:
[..]

I don't think that's a good idea. There's only one dirserv and a webpage that talks to it could easily be abused.


How?
And last time I checked there were multiple dir servers...
Ok, I haven't been around for a while, but I don't think that changed.

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
_________________
It's a shark! Oh my god! Unbelievable!
Back to top
View users profile Send private message Add User to Ignore List
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:40
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3614
Location: Las Vegas
Offline

PostPosted: Mon Apr 24, 2006 10:18 am    Post subject: Reply to topic Reply with quote

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole.... wrote:
Is http://wiki.minegoboom.com/index.php/Directory_Client_Protocol the only information available about the protocol?

You have to connect to the server by the Core Protocol first, then use the core protocol's reliable packets for the directory section. You cannot do this in a blocking mode, because with this many packets you might lose one or two and would cause the socket to time out.
Smong wrote:
I don't think that's a good idea. There's only one dirserv and a webpage that talks to it could easily be abused.

There is a feature called caching. If someone goes to the page, and it hasn't been updated in around 5 minutes, check the directory server for a new list. If hasn't been updated in a minute, check the zone's pings. Otherwise, use old cached data you have stored, which I'm assuming you might as well store so you could create pretty graphs of zone population/pings from a database. Or just cache directly to a text file.
Back to top
View users profile Send private message Add User to Ignore List Send email
k0zy
Server Help Squatter


Gender:Gender:Male
Joined: Jan 11 2003
Posts: 571
Location: Germany
Offline

PostPosted: Mon Apr 24, 2006 10:51 am    Post subject: Reply to topic Reply with quote

Mine GO BOOM wrote:
There is a feature called caching. If someone goes to the page, and it hasn't been updated in around 5 minutes, check the directory server for a new list.


Exactly what I thought of.

Well, seeing as this is the first time I actually code something with sockets, it might take me a while to figure out.
What I'm looking forward to is, we'll learn about using sockets in C in our operating systems lesson at university. So this will be good practise icon_smile.gif

Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
Back to top
View users profile Send private message Add User to Ignore List
Rog
Newbie


Joined: Oct 18 2007
Posts: 18
Offline

PostPosted: Sat Oct 20, 2007 6:25 am    Post subject: Reply to topic Reply with quote

One note for this dated topic: If you are going to do anything with UDP you should set your sockets to a short time out (2 seconds should be more than enough). Otherwise, if your Subspace server is down and there is no answer at the ip+port your webpage will likely hang. Use: stream_set_timeout()

You could also extend it this way to indicate whether your server is online / offline.
Back to top
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Sat Oct 20, 2007 11:21 am    Post subject: Reply to topic Reply with quote

dated?

over a year... that's not dated, that's ancient
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Sat Oct 20, 2007 4:40 pm    Post subject: Reply to topic Reply with quote

I would never let my webpage script's directly make a call to the directory server. When I did begin playing around with it I created PHP scripts which were executed by a scheduler (CRON) which pulled down current population, ip, and port.
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
Doc Flabby
Server Help Squatter


Joined: Feb 26 2006
Posts: 636
Offline

PostPosted: Sun Oct 21, 2007 12:17 pm    Post subject: Reply to topic Reply with quote

a webpage that links directly to my directory server would get ip banned. (ie request to dir server made for every page refresh)

I only update the cache on my server of the main dir server every 30 - 60 mins, to minimize the bandwidth, whilst making it useful. If people have my server directry entered they get instant updates.

Cached queries as cypherJF says are the only acceptable and polite way, anything else is just abuse.
_________________
Rediscover online gaming. Get Subspace | STF The future...prehaps
Back to top
View users profile Send private message Add User to Ignore List
k0zy
Server Help Squatter


Gender:Gender:Male
Joined: Jan 11 2003
Posts: 571
Location: Germany
Offline

PostPosted: Sun Oct 21, 2007 2:28 pm    Post subject: Reply to topic Reply with quote

Why would someone ever not cache the results?
It's just stupid do query the directory server with every page refresh.
Not only because it creates unnecessary load on the dir server, but the page will also take longer to load.
Plus, if the dir server goes down, the page is useless.
Back to top
View users profile Send private message Add User to Ignore List
Goldeye
Novice


Gender:Gender:Male
Joined: Dec 15 2003
Posts: 57
Offline

PostPosted: Wed Dec 26, 2007 8:24 am    Post subject: Reply to topic Reply with quote

I made a PHP class to use the new ping protocol to report playing/total players for either the server or individual arenas. Requires minimal customization (IP,Port,and arena names).

I put it on the wiki: http://wiki.minegoboom.com/index.php/PHP_ping_client
Back to top
View users profile Send private message Add User to Ignore List Send email
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Misc User Apps All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 669 page(s) served in previous 5 minutes.

phpBB Created this page in 0.456723 seconds : 34 queries executed (80.0%): GZIP compression disabled