Setting up a PHP server script

Everything todo with programming goes HERE.
Post Reply
User avatar
TelGod
Posts: 3
Joined: Sat Aug 25, 2012 3:37 am
Contact:

Setting up a PHP server script

Post by TelGod »

Does anyone know how to set up a PHP server script? I've searched online for instructions, but I only find the scripts themselves. Any help would be appreciated. Thanks!
Give the tree a break; hug a rim instead.
User avatar
kyle
Reverse Outside Corner Grinder
Posts: 1876
Joined: Thu Jun 08, 2006 3:33 pm
Location: Indiana, USA, Earth, Milky Way Galaxy, Universe, Multiverse
Contact:

Re: Setting up a PHP server script

Post by kyle »

like this http://crazy-tronners.com/wiki/index.ph ... g_a_Server

only now there are a few more things you can do a bit better than that, but that should still work.
Image
nux
Round Winner
Posts: 206
Joined: Mon Sep 12, 2011 11:20 pm

Re: Setting up a PHP server script

Post by nux »

42­­­­­­­­­­­­­­­­­­­­­­­
There's a difference between knowing your shit, and knowing you're shit. Grammar does matter.
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Setting up a PHP server script

Post by LOVER$BOY »

You can use that or you can take the full tutorial here: http://wiki.armagetronad.org/index.php/ ... u_Computer
Image
Moofie
Core Dumper
Posts: 125
Joined: Fri Jan 27, 2012 1:36 am
Location: Ohio
Contact:

Re: Setting up a PHP server script

Post by Moofie »

Yes use this.
Then when you have a server up, with the script of your choosing in the /scripts directory, type

Code: Select all

SPAWN_SCRIPT scriptname.php
into the server console, or in the config file.
User avatar
TelGod
Posts: 3
Joined: Sat Aug 25, 2012 3:37 am
Contact:

Re: Setting up a PHP server script

Post by TelGod »

Thank you for the help. I really am grateful! By the way, I have had problems where people can't play on my server because they don't have my map on their computer. Does anyone know how to make the maps available to them so they can get on the server without having to download the map manually?
Give the tree a break; hug a rim instead.
User avatar
AI-team
Shutout Match Winner
Posts: 1020
Joined: Tue Jun 23, 2009 6:17 pm
Location: Germany/Munich
Contact:

Re: Setting up a PHP server script

Post by AI-team »

Yes, I do
  
 
"95% of people believe in every quote you post on the internet" ~ Abraham Lincoln
 
 
nux
Round Winner
Posts: 206
Joined: Mon Sep 12, 2011 11:20 pm

Re: Setting up a PHP server script

Post by nux »

AI-team wrote:Yes, I do
Oh, i know how to too, what a coincidence.
There's a difference between knowing your shit, and knowing you're shit. Grammar does matter.
User avatar
TelGod
Posts: 3
Joined: Sat Aug 25, 2012 3:37 am
Contact:

Re: Setting up a PHP server script

Post by TelGod »

Well, can anyone tell me how?
Give the tree a break; hug a rim instead.
nux
Round Winner
Posts: 206
Joined: Mon Sep 12, 2011 11:20 pm

Re: Setting up a PHP server script

Post by nux »

Im sure somebody can.

Ok, thats enough. You need to put the file in an http server and then just put the link in your server config, something like.

map_file yourname/type/file.xml(http://example.com/yourname/type/file.xml)

I dont think the path you use on the http server really matters, and i probably got something wrong, im just pointing you in the right direction.
There's a difference between knowing your shit, and knowing you're shit. Grammar does matter.
User avatar
compguygene
Adjust Outside Corner Grinder
Posts: 2342
Joined: Thu Aug 21, 2008 12:09 pm
Location: Cleveland, Ohio
Contact:

Re: Setting up a PHP server script

Post by compguygene »

To be precise, and to use an example that is similar to other things on the wiki.

This example assumes that you are using apache2 which uses /var/www as the root directory for the webserver.

I have created the map mynewmap.xml.

I store it in the directory /var/www/resource/compguygene/mynewmap.xml

My domain name is compguygene.tk

Code: Select all

MAP_FILE  /resource/compguygene/mynewmap.xml/ (http://www.compguygene.tk/resource/compguygene/mynewmap.xml) 

Would be the command in my config file.

I will most likely need to add

Code: Select all

RESOURCE_REPOSITORY_SERVER http://www.compguygene.tk/
RESOURCE_REPOSITORY_CLIENT http://www.compguygene.tk/
as the default for these 2 commands is the normal armagetronad repository and you need it to point to your's.
Armagetron: It's a video game that people should just play and enjoy :)
https://bit.ly/2KBGYjvCheck out the simple site about TheServerPharm
User avatar
LOVER$BOY
Match Winner
Posts: 731
Joined: Thu Jan 24, 2008 12:46 pm

Re: Setting up a PHP server script

Post by LOVER$BOY »

It's pretty much that the map must exist in a remote web server (a website for instance).

The default location for all maps are pointed towards: http://six.resource.aa.dashjr.org/resource/ which is where most of the maps are stored. I have to admit, this is also quite a stable place to store them too but you will need to contact the admins if you want to store your files there.

As for downloading remote maps. When the map doesn't exist locally, the REPOSITORY_RESOURCE_SERVER/CLIENT will download the map from that web url you put in.

The other method to directly download map from different urls is to use the (...) method where you place the entire link to the file.

Hope this clarifies things for you :)
Image
Post Reply