0 Favourites

AJAX + PHP Maker Plugin

  • Well As you see I have problem with understanding the concept of making PHP Coded file in an internet server (by the way is Dropbox is considered a server?) and load data via AJAX Plugin. It just exceed my understanding ability. So I was wondering if there was a plugin which helps you to modify or create a PHP File and load data from it. I would be grateful because whatever I do, I just don't get it.

  • It possibly would be hard to make a plugin that can create PHP files. I myself currently trying hard to learn a bit of PHP, to communicate with mysql. But then again, as a non coder, it would be great if I can create a PHP file to communicate with mysql through C2 event system. I'm not sure the degree of difficulty to pull this off, I guess we need some insight from traditional coder from the community.

    Naji how do you intend to use the PHP? I don't get your post, are you trying to create a server side logic or a database server? For server side logic, the MP already capable of that, but for the database, there is no option to have a readable, reliable and transferable database now except if you write your own PHP traditionally and communicate it with sql.

    Let see Ashley opinion on this.

    PS: Anyone knows any IDE or software or whatever that can make PHP much more approachable for a code-blind person like me? Just like javascript to C2 kind of thing.

  • DuckfaceNinja , Actually I don't know what to say since I don't understand SQL & AJAX & JSon etc.. (as my topic says) but what i want is to save data online and retrieve it in my game. Like Online Highscore system. Just To save data online and use it in the game.

  • DuckfaceNinja , Actually I don't know what to say since I don't understand SQL & AJAX & JSon etc.. (as my topic says) but what i want is to save data online and retrieve it in my game. Like Online Highscore system. Just To save data online and use it in the game.

    This means you need PHP+mysql, similar to what I need except that I have a considerably much complex ambition to go for. Let see what people have to say.

    There's a possibility that there are softwares that can do this, but I don't know what I should be looking for. So far PHP generator I've seen are not intuitive at all, might been better if I learn PHP through and through, but I'm still hoping that there will be such a thing as PHP in event system exist.

    Been on search a bit just now, a lot of mention on node.js to communicate with mysql though, maybe it's possible to access mysql through javascript after all.

  • Compiling events to PHP is not going to happen! Insanely complicated and kind of a weird idea.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Lol that explain the lacking presence of visual programming for PHP.

  • Actually I won't consider PHP as a good language as it has some quirks that should be fixed since years ago. That's why I've switched to Node.js as my main server-side backend recently because of it's simplicity and language (no more PHP )

  • Actually I won't consider PHP as a good language as it has some quirks that should be fixed since years ago. That's why I've switched to Node.js as my main server-side backend recently because of it's simplicity and language (no more PHP )

    It would be great if somebody can make a plugin around node.js to support communication to mysql. I think it should go well because it is javascript?

    Btw, if the code to communicate with mysql is on the client side, that would be security issue right?

    Noob Findings: NoFlo

    Will this tool allow me to achieve what I need? It mentioned node.js in the overview.

  • Naji

    to answer one of your other questions...

    dropbox is not considered as a "server" with respect to things like PHP. dropbox can share files out, but it does not provide you with an ability to run programmes on it.. php running server-side with MySQL requires something like Azure/Amazon or similar service, or a dedicated machine.

  • First of all, PHP has no event loop: it was designed to receive input, do some work, then return the results. It implements a concept called "shared-nothing architecture" which means a script doesn't share anything with another script. Implementing a "loop forever" script in PHP means overriding so many settings that no out-of-the-box host will want to touch your scripts.

    This, among many other things, means a direct construct-to-php conversion will never work.

    It would be great if somebody can make a plugin around node.js to support communication to mysql. I think it should go well because it is javascript?

    It is possible to create a plugin to save construct2 things to MySQL, and then create a companion php script that you can run on a webserver, but if you're going to do that, you might as well make a company that provides this as a service.

    Also, unfortunately, the store still doesn't accept plugins as submissions...

    Actually I won't consider PHP as a good language as it has some quirks that should be fixed since years ago. That's why I've switched to Node.js as my main server-side backend recently because of it's simplicity and language (no more PHP )

    Everything you said is true (Nothing beats PHP in terms of speed of development, though!)

    Also, I'd argue that the main advantage of moving to Node.js is increasing code reuse, since you can start coding in javascript and never leave.

    Btw, if the code to communicate with mysql is on the client side, that would be security issue right?

    Yes, but if you get someone to develop this for you, they won't do it like that.

    Besides, if you don't know server-side programming, you probably don't know SQL either.

    There are many ways to guarantee security while keeping code on the client.

    Noob Findings: NoFlo

    Will this tool allow me to achieve what I need? It mentioned node.js in the overview.

    No, it won't.

    But it's a very nice tool, thanks for posting it!

  • Also, unfortunately, the store still doesn't accept plugins as submissions...

    If there's a plugin which allows me to communicate with mysql through C2 event system, I will shove the money to the seller's face no question asked. It would darn great if it has the similar feel of using array!

    MP plugin is already usable as the "bridge" from client to server, if only there's another bridge to mysql, that would awesome!

    C2_MP_client-->C2_MP_server-->mysql = imagine the possibility! Full feature multiplayer game purely in C2!

  • Your sql logic is meant to be server side to prevent security breaches and ppl fuxing with your database , don't throw money at anyone for a feature like this, you'd be putting you and your users at risk.

  • Your sql logic is meant to be server side to prevent security breaches and ppl fuxing with your database , don't throw money at anyone for a feature like this, you'd be putting you and your users at risk.

    You don't think a programmer capable of doing this would just RPC SQL calls from the client, right?

    If I were to make something like this, I'd make a plugin with a certain set of actions that made AJAX calls to an API made in PHP. The API would then validate each field and only then execute the proper pre-built queries. This is why I said that you could make a startup to do this, instead of a plugin.

  • Your sql logic is meant to be server side to prevent security breaches and ppl fuxing with your database , don't throw money at anyone for a feature like this, you'd be putting you and your users at risk.

    Yes sql is meant to be on server side and C2 MP plugin is there to be use to make the "bridge", the concept is to create a C2 project as the host and run it in a browser on the server. Well it is a flimsy server but for a small scale game, I think this is acceptable as the code for the host is theoretically unreachable, I dont see any reason for hackers to put effort in screwing up the game for an imaginary profit.

    My thought is, to be able to do this, I have to get a VPS at least and run the index.html (call it a lobby host) on a browser through remote connection. The silly setup that I have now is a very small C2 project that keep the highscore on the serverside webstorage. The client send an array.asjson instead of numerical variable, as to prevent cheating, then the lobby host just calculate the score and then send it to mysql on client behalf.

    This webstorage data is not visible for me through normal means, so I set the browser to download the file asjson for every hour or every 30 minutes just to get data that I can read. This way I will have a continuous pile up of text/json file which I definitely think is not good, the data should be handled by mysql instead.

  • DuckfaceNinja maybe look at firebase, it seems someone made a plugin for it as well.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)