I am creating a a control panel for minecraft servers(It's a game if you did not not know). I need to process the server.properties file in php to get the online-mode field and get it's value. How do I do this? Any idea?
This is an example of server.properties:
spawn-protection=16
query.port=25565
generator-settings=
force-gamemode=false
allow-nether=true
gamemode=0
enable-query=true
player-idle-timeout=0
difficulty=1
spawn-monsters=true
op-permission-level=4
announce-player-achievements=true
pvp=true
snooper-enabled=true
level-type=DEFAULT
hardcore=false
venable-command-block=false
max-players=5
rcon.port=25575
server-port=25565
debug=false
texture-pack=
server-ip=
spawn-npcs=true
allow-flight=false
level-name=
view-distance=10
resource-pack=
spawn-animals=true
white-list=false
rcon.password=asd
generate-structures=true
online-mode=true
max-build-height=256
level-seed=
enable-rcon=true
motd=A Minecraft Server
And yes, the fields keep juggling around so I can't really predict where the line would be.