Taalasmaa Posted July 9, 2010 Share Posted July 9, 2010 Hello, MTA. I got little problems, I wanted to make webstats system (wanted levels) and so on, but I don't know even where to start I'm not asking you to script a system or any scripts to me, but is there any tutorials/sites (wiki?) where I can find more information about sending data from server to html (php). I can script lua very well (scripted for a year). I started to learn php months ago. I'm just too newbie in sending datas from lua to php, so simply, I'm just looking for sites where I can learn to send datas and so on, so I can implement my websystem (I can maybe put it to community after done it). Anyway, any help would be great. Thanks. Regards, Taalasmaa. Link to comment
Taalasmaa Posted July 9, 2010 Author Share Posted July 9, 2010 Oh, I found this: https://wiki.multitheftauto.com/wiki/PHP_SDK Gonna try it, I'll ask if i have any questions EDIT: can I call to php with callRemote, or can I just call to other servers with it? EDIT2: of course i can never mind. function chatz ( message, type ) callRemote ( "http://www.gamenet.fi/stats.php", getResourceName(getThisResource()), "phpFunction", chatBoxFunction, getPlayerName(source), message, type, getServerPort() ) end addEventHandler ( "onPlayerChat", getRootElement(), chatz ) How can I make function to PHP that takes this? Link to comment
50p Posted July 9, 2010 Share Posted July 9, 2010 Read the PHP SDK page. It's all there. Link to comment
Taalasmaa Posted July 9, 2010 Author Share Posted July 9, 2010 Yeah, thanks 50p. <?php include( "mta_sdk.php" ); $input = mta::getInput(); $input[0]; mta::doReturn($input[0]); ?> This is my PHP file function messages() callRemote ( "http://**.***.***.**/stats.php", outputDebugString, "works" ) -- I hided my ip. end addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),messages) This is my lua file it debugs this "works" to server debug. I just want to know how can I get this "works" to my sites too. In my sites (stats.php) it just shows as [null]. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now