How do I use "Send Data to Website"?

How i can send Data to a Website, and which PHP code do I need to write at the other side…, i did not find any dokumentation for that feature :confused: can you point me in the right direction?

noone any conclusion to this question?

Never tried it myself, but I imagine it’s something more like that :

No, file are provided with Game Develop : Game Develop Folder\Ressources\Internet.

Juste follow the instructions in these files.

aaah, thank you very much…, the comments are all in french … i will try my best …, perhaps there is one out there who can shortly describe what i have to do for sending data to this php script…, but as i mentioned, I will check this out and let you know how far I get with it…

I’m working on a simple Online Hi-Score system, using PHP/MySQL.
I will try to pull out an english HowTo from this.

I’ve translated these files (very fast, there are certainly english mistakes).
Download :
(The english translation are below each french text, first, read the file “Lisez-moi.txt” : it’s the “read me”)

The basic steps to follow are :

-Edit the file “Config.php” to change the password ( The line is : $mdp = “remplacez ceci par votre mot de passe”;. Replace “remplacez ceci par votre mot de passe” by a password ).
-Send the files on a web site.
-Use the related action in Game Develop, with the same password as the one used in “Config.php”.

The php code of the files is not really complex, but I will try to update the comment to rewrite them in English.
EDIT : Victor just did it, great :slight_smile:

If you prefer a PHP/MySQL solution, you could take a look here :
It’s a step-by-step tutorial for a basic online hi-score system. Text only, but might give some hints about how to set up a database-based dynamic game.
Works ok for me.

Good luck.

Nice tutorial also :slight_smile: It could be inserted on the wiki by the way.

Hi folks, this is a grea tutorial. I know PHP and My sql, so, no problem; but I have a doubt: I could not find in " add an action", this option “Send data over Internet”; I did something wrong, or I am using a different version.


This action was deprecated in favor of the new action “Send http request”.
It can be used to do many more things, for example here is an article about how to load a JSON file: … s/jsonfile

You can use this action to send a request to a PHP file on a website. The body of the request would be something like this:

And then, you’ll be able to get the content of these data in the PHP script :slight_smile:

Thanks @4ian,
Nice improvement. I did a fast test, but did not test send from the PHP file to mysql yet; but I think it wil be no problem.

This is a great solution, using javascript object gives us many possibilities!
I’ll try this.

Hi 4ian, mtarzaim, victor

I can access data from json, and from php easily(now!); so this is not a problem.

But I liked the mtarzaim solution with php/myslq and following his instructions I could create an online score system for my game( and stylish a bit the table with some css ).

I can access the mysql data with no problem, here is the screenshot(this is the data created directly from phpmyadmin):

But when I try to write data from Gdevelop, something goes wrong, no new data is recorded, so I’ve checked the HTACCESS, the php code to write it, and the Gdevelop action many times, and I could not find the source of the problem.

Here is the PHP file code to write in table( It’s a litte bit different from the original created by @mtarzaim, but I have other columms:

And this is the Gdevelop codes:

And here the HTACCESS lines:

So, any idea? Thanks… :smiley:

Why do you start your request using an “&” instead of a “?” or nothing ?

EDIT : In fact, the content of a POST request is directly the first parameter (? is just used by URLs).

Oh, you are right! Maybe I had deleted some lines before and did not noticed that.
I’ll try again. Thanks Victor!

This is the new lines in the request fields…


But it is not working…

Do you mean :

Fixed with “name=” before it… but It still not working.
I’ll try to find something missing and post here.

Your PHP code uses $_GET[] but you send a POST request. :wink: