ID:158087
Nov 4 2009, 9:32 pm (Edited on Nov 4 2009, 9:37 pm)
|
|
i want to know if i import data to a site, and the site file is in php. would it download the php file before it would redirect to a text file? and is there a way to read the text file before the world/New() proc ends so if the text file said banned it would use world.close?and is there a world.close lol
|
In response to Schnitzelnagler
|
|
i mean would the server wait till the php gets done checking if the ID is banned
ex the game when hosted tells the server "im hosting with the ID# 00001" the server checks the list of ID#s to see if it was banned if the server finds that the ID is banned it would go to a text file that has some kind of code that tells the server that its banned then the server reads that its banned and closes before anyone joins |
In response to Espock
|
|
You are describing different functionality from what you hinted at in your first posting.
As for your questions... Behind the scenes, communication with a PHP server looks like this:
Or, in other words, yes, world.Export() waits for a reply and the reply is sent after PHP is done doing whatever it was told to. As for your problem at hand, I would honestly consider using white listing, instead of black listing and then combine the effort with BYOND's built-in functionality. You can see an example under the reference entry to world.OpenPort, since this is the proc responsible for 'hosting' a game. Edit: For the sake of being clear, for subscribing, I'd again, use BYOND's built-in functionality of client.CheckPassport. |
If you import data from a web-page, it does not matter if the back-end relies on PHP, because PHP is interpreted and executed server-sided.
I am not sure what exactly you refer to as 'redirect to a text file' though.
If you intend to rely on security through obscurity (as you mentioned 'banned') with this method involved, please note that it can be bypassed without much effort and thus might not be the best choice.
There have been similar topics already, which the forum search might reveal.