mysql + php
#1

i have a question..

can i call a function in my gm by using a php webpage using mysql?

example:
i connect to my page and send a query to mysql when query finish activate a callback like
OnQueryFinish and in game send a message that say php query finished success



i can do it? or its just fantasy ?
Reply
#2

Yes, you can do it. You could create a PHP script that enters a query in to your database table (say, tasks) and run a timer in your gamemode to check the 'tasks' table to see if there's any new tasks to complete.
Reply
#3

mmm can you show me a simple code? please
Reply
#4

http://pastebin.com/uWynNVLi

Untested. But I doubt you'll be able to send more than 1 parameter to a function in PAWN with that.

And the PHP: http://pastebin.com/g9pmYULr (note, to add things you'll need to add things to the $_GET var, so at the end of the URL add '?format=asdasda&parameters=asfafsfah&function=asa ' etc. If you create the table (in MySQL) with the same fields etc, you're going to also need to create 'identifier' as an auto-incrementing field as a primary key.
Reply
#5

thx im testing
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)