Hi,
This is a small example of how to manage an Online Highscore in a game.
http://www.mediafire.com/?d8wg94engnpragg
I would like to thank ThePuppetMaster for his great TSNE library and his support (Also ssteiner)
The HTTP link inside "HighScore_Demo.bas" are valid so test it as much as you want.
The program should work on both Linux and Windows
Adjust Display_Mode for different kind of screen output
Adjust Ask_For_Score to bypass score question
I also put some help on how to setup your own SQL database
Validation for Name and highscore are currently only made inside the program and not the PHP code.
That is easy to fix but this demo i just ment as an example
I hope this will help the community
HTTP - PHP - SQL example
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: HTTP - PHP - SQL example
I hate to hijack your thread. I notice you didn't share code directly but instead chose to use mediafire.
That's fine, but historically, the FreeBASIC community has lost a lot of code and the forum has a lot of bad links on it because hosts have decided to stop working or remove old links.
Is there any chance you can create an account on GitHub or DropBox and upload your examples for all to see? (And to be permanently stored in the cloud?)
Here's the thread where this issue was addressed, if you're interested: http://www.freebasic.net/forum/viewtopi ... 17&t=20840
That's fine, but historically, the FreeBASIC community has lost a lot of code and the forum has a lot of bad links on it because hosts have decided to stop working or remove old links.
Is there any chance you can create an account on GitHub or DropBox and upload your examples for all to see? (And to be permanently stored in the cloud?)
Here's the thread where this issue was addressed, if you're interested: http://www.freebasic.net/forum/viewtopi ... 17&t=20840
Re: HTTP - PHP - SQL example
We used to have the FreeBasic archive, all the code from there is pretty well lost, unless you go through the cryptic process of retrieval, which takes about a week.
I have used mediafire, and it seems to be the most commonly used external site on this forum.
Full of advertizements of course, and if you click wrongly you could get the unexpected.
It would be nice to have some sort of archive again, to be used for the larger project storage and access.
I have used mediafire, and it seems to be the most commonly used external site on this forum.
Full of advertizements of course, and if you click wrongly you could get the unexpected.
It would be nice to have some sort of archive again, to be used for the larger project storage and access.
-
- Posts: 5494
- Joined: Sep 12, 2005 20:06
- Location: California
Re: HTTP - PHP - SQL example
dodicat: I see that mediafire is being used by a lot of people, but external hosts lose the benefit of being able to use the forum search to find snippets relevant to what you're looking for.
Posting code examples directly is the best case scenario, IMO.
Posting code examples directly is the best case scenario, IMO.
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
Re: HTTP - PHP - SQL example
For small, single files, gists should work quite well, or using the full github for multi-file projects like this.
Github and Gist shouldn't be going anywhere anytime soon. It's always a bit inconvenient to have to browse away from the forum, but prevents those long scrolling threads where someone posts a program, then someone pastes a copy of the whole thing with a few lines changed somewhere.
Mediafire might be the best option if you don't expect anyone else to edit the code, and you don't care about ads, or the link going dead in the future.
Github and Gist shouldn't be going anywhere anytime soon. It's always a bit inconvenient to have to browse away from the forum, but prevents those long scrolling threads where someone posts a program, then someone pastes a copy of the whole thing with a few lines changed somewhere.
Mediafire might be the best option if you don't expect anyone else to edit the code, and you don't care about ads, or the link going dead in the future.