Cheating php/html 5 game

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

howlerbr
New php-forum User
New php-forum User
Posts: 1
Joined: Tue Nov 27, 2012 5:36 pm

Cheating php/html 5 game

Postby howlerbr » Tue Nov 27, 2012 5:44 pm

Hello, my first post! I know that cheating is bad but this is the idea of the game. Try to cheat it to get a high score. The winner will receive a Nintendo DS (Brazil only promotion).

So, I'm needing some help. I have no access to the server running the game, but since it's a html5 game a have the source code. The problem is that it makes some ajax calls to a PHP page in an apache server (again I dont have access to it).

It firsts opens a session for current player:

$.ajax({
url:'sessao.php',
data:'nome='+nome+'&email='+email,
type:'post',
success: function(retorno){
highscore = retorno;
}
});

After it return a score_id to submit at the end of the play:

$.ajax({
url:'salvar.php',
type:'post',
async: false,
success:function(retorno){
score_id = retorno;
running = true;
}
});

Here is when game is over it calls another php page submitting the points

$.ajax({
url:'salvar.php',
data:'score_id='+score_id+'&pontos='+pontos+'&consulta='+consultaTop,
type:'post',
async: false,
success:function(retorno){

I have tried several ways but always get a "Access-Control-Allow-Origin" error.

How is the best way to cheat it? I have tried to create a local apache/php server and saved all files that I have access (mainly the game itself that is in a index.php file along with lots of javascript). I don't have access to salvar.php and sessao.php file.

Any ideas?

Thanks

HWBR

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: Cheating php/html 5 game

Postby seandisanti » Wed Nov 28, 2012 3:51 pm

Learn javascript or get better at the game


Return to “PHP coding => General”

Who is online

Users browsing this forum: No registered users and 1 guest

cron