Jump to content

need help


Machine

Recommended Posts

Posted

hello well im making site to control my server

but the problem is im using php

so what is the code to start mtasa server using php programming

pls help me

Posted

fetchRemote 

Maybe ??

This function allows you to post and receive data from HTTP servers. The calls are asynchronous so you do not get an immediate result from the call, instead a callback function you specify is called when the download completes.

In the case when the call fails, a string containing "ERROR" followed by an integer containing the error reason will be passed to the callback function. The reason for failure will be similar to errors found with websites - file not found, server not found and timeouts.

If you are using fetchRemote to connect to a PHP script, you can use file_get_contents("php://input") to read the postData sent from this function.

Posted

If it's impossible, mind explaining how all the game hosting companys work? because most of them got a control panel to restart/stop/start the server.

@Machine, Micro: I don't know anything about this I'm afraid.

Posted

If you want to start/stop/restart your server, you would need to put your server on a vps, it would not be able to start/stop/restart on anything else other than a vps or your computer.

Posted (edited)
Make no sense.

Since you think it's impossible then you have no business here.

Yes why? becuase his code make no sense in Lua PG.

ummm, actually, that's php programming(website programming)

Edited by Guest
Posted

@Mr.Pres[T]ege, no, that has nothing to do with what he wants / No, it isn't impossible. / His code DOES makes sense, it's PHP.

@Micro, is the page running in the same folder as the server?

@Jaysds1, PHP isn't for website design.

Posted
Are you running your site on a vps?

What does that has to do?

@Micro, I've never used exec function so I can't help you much but are you sure the PHP page is being executed? Try outputting something when the page loads with "echo".

Posted

all this codes not workin

<?php

if ($_REQUEST['soft']=='toto')

shell.exec("./mta-server --ip %IP% --port %PORT%");

shell.exec("nohup ./mta-server --ip %IP% --port %PORT%");

shell.exec("sudo nohup ./mta-server --ip %IP% --port %PORT%");

exec("sudo nohup ./mta-server");

?>

Posted

There is no such "shell.exec" function in PHP AFAIK.

Also, are you sure you're sending the data 'soft' with value 'toto'? The page URL would be something like this: "http://www.mypage.com/index.php?soft=toto".

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...