Android Question Uploading Highscores to my Server

wonder

Expert
Licensed User
Hello,

I don't have any experience with HttpUtils, so please forgive my total lack of knowledge on this matter.

Let's say I have a space invaders game and I want to upload the highscore as username.txt.
At first I was going to do this using FTP protocol, but DonManfred suggested that this should be done via POST using the HttpUtils lib.

How does this work? Do I also need PHP code running on the server side? I know nothing about PHP. :(
 

Peter Simpson

Expert
Licensed User
I personally would use a database instead of files. I always develop using MySQL on servers, but MS SQL will do just fine too. I personally use libraries to connect to my clients databases, but the PHP solution would probably suite your needs just fine. I would use a database to store scores so you can easily integrate multiple users scores. At the same time with a simple query you can also have a top 10 or top 100 scores of all time. Displaying just the current users scores would be a doddle to display t

Hay if you need help with the DB, just give me a shout :)
 

wonder

Expert
Licensed User
Well, I do need some help with DB... Actually, I need all the help. I'm a little bit ashamed to admit that I know nothing about DB's, except that they exist. :confused:

This is how I feel about PHP, DB and MySQL:
 

RandomCoder

Well-Known Member
Licensed User
To say I have no experience of databases would be a lie as I've administrated a pretty large computerised maintenence management system (CMMS) but that was all done using MS Access. So I've got a reasonable understanding of relational database design and SQL but these days everything seems to be stored on the cloud and using php scripts to action the queries. I have no experience at all with php but there's a three part tutorial here on the B4A forum which is really informative.

Sorry @wonder I'll stop hijacking your thread now :p
 

wonder

Expert
Licensed User
Take a look here: http://www.b4x.com/android/forum/th...hp-mysql-server-xampp-with-b4a.48635/#content

You can install the package (one-click-install) on your pc/laptop whre you use b4a (must be Win7/8)

B4a app included!
@KMatle, thank you very much for this reference!

How can I install it? I've registered ninjadynamics.com via domain.com and they offered me free web hosting for one year. I have FTP access to my domain, so I can upload stuff, but I have no idea how to install software into it.
 

Peter Simpson

Expert
Licensed User
Okay, so you'll be hosting it online. I highly recommend use either MySQL or MS SQL. These databases are simple to create and easy to manage via either your web login control panel or a windows package like MySQL WorkBench or HeidiSQL (highly recommended). Here's the link for HeidiSQL, it works works perfect with databases types MS SQL, MySQL and PostgreSQL (experimental integration) http://www.heidisql.com/.

Good luck :)
 

DonManfred

Expert
Licensed User
How can I install it? I've registered ninjadynamics.com via domain.com and they offered me free web hosting for one year. I have FTP access to my domain, so I can upload stuff, but I have no idea how to install software into it.
xampp is for windows. You can not install it on a webhosting.
xampp is made to run your pc as a server.
 

RandomCoder

Well-Known Member
Licensed User
I have no experience at all with php but there's a three part tutorial here on the B4A forum which is really informative.
I missed it first time :oops:, but check out @KMatle signature. That's the three part tutorial I was referring too! :D:D:D
 

Peter Simpson

Expert
Licensed User
xampp is for windows. You can not install it on a webhosting.
xampp is made to run your pc as a server.
100% correct. XAMPP is mainly for the home or small business users as it's not difficult to setup and is extremely easy to use. But saying that I always install MySQL and have only played about with XAMPP for fun, even though I do have clients who use XAMPP in their office work environment, not installed by me.
 
Top