External Zone Count?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

External Zone Count?

Postby coolboy714cp » 27 Feb 2013, 06:49

Hey guys, I was just wondering if there is some way to do an external zone count in SFS2X, like you can do in SFS Pro?
And if so, could someone tell me how one would go about doing this?

Any help would be greatly appreciated! Thanks!:)
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: External Zone Count?

Postby Lapo » 27 Feb 2013, 09:37

It can be done easily with any API, such as Flash or HTML5 for a web page.
You can create a small app with those API which connects to the server, joins a special Zone (not the one you want to monitor) and asks the Zone count to an Extension.

An alternative is using the database: you can write the Zone count to your DB via the Extension and then read it from the web page.
The update can be done at regular intervals, like every 30-60 seconds, depending on how precise you want it to be
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Re: External Zone Count?

Postby coolboy714cp » 27 Feb 2013, 13:03

Oh okay thanks! I didn't think about using the HTML5 API.

Is it possible to do the same thing using a language that doesn't have the API built for it? Such as PHP, for example?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: External Zone Count?

Postby Lapo » 27 Feb 2013, 13:38

Using PHP the best thing is via the database, since there's no PHP API to talk to the server directly.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Re: External Zone Count?

Postby coolboy714cp » 27 Feb 2013, 21:51

Okay I see what you're saying, but in theory, would it also be possible, for example, to examine all the packets sent to the server, then just replicate it by sending the same data to the server to get the same response as one would get with using the API, just by using simple socket functions in other languages, such as python, php, etc?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: External Zone Count?

Postby Lapo » 28 Feb 2013, 08:42

No, it's a huge work, and I wouldn't recommend it.
Plus the SFS2X protocol is fully binary which requires a language capable of manipulating data at the byte level.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Re: External Zone Count?

Postby coolboy714cp » 01 Mar 2013, 04:54

Okay thanks! That's the answer I was looking for!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 69 guests