Hello. I've been wondering if there is any way to send a file, (savefile, icons, ect..) through the world Export() proc, to a PHP script.
Export allows you to make a request, so is there anyway one could have a PHP script recognize the file one may have sent?
I realize that PHP doesn't seem to even recognize a file was sent to begin with, but I'm wondering if there's a way to change this.
Hmmm, using a DDL may actually be what I need...
However, I'm completely ignorant when it comes to C++ and actually making a ddl/so x.x It's a bit of a wall, but I suppose I'll have to learn... Though if anyone knows how I would have to send a file, in a way that PHP can recognize it, some advice would be greatly appreciated... x.x |
You could just use a web form and POST the file a php script to save it server side, or use jQuery and Ajax.
|
Hmmm, the point isn't really for the player to send files to the web server. It's the server that's sending relevant files, that byond usually generates, such as icons and savefiles.
|
If the file is not too large, you can get the binary content of a file (http://www.byond.com/developer/Hobnob/file_io) and send it onto the &filecontent=. This uses a DLL also.
In the past I've opted to use mysql with the file_io, and stored the binary of the files in the database. When needed, they can be queried and loaded, or used in PHP, though you'd need to do a bin2file conversion if the user should be able to download them. This would use a DLL for the database, and a DLL to convert the file.