Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 4th, 2006, 8:05 PM   #21
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
Something doesn't seem right here. I could be wrong, but I agree with whoever it was that said this could be a 'security risk'. Seems like people could easily cheat the system. What I dont get is that you make the game in java, pass the score to the php page (correct?), ask the user for there name, and then pass it to a server to enter in the highscores list.

So, you get the high score, and tack it to the url like this (as jimbo said) :
http://someplace.com/aPage.php?score=10294059

(edited name out)

You redirect them to the page right? where they enter there name.
Its basicly the cod you have, with the highscore tacked on.
http://someplace.com/aPage.php?score=10294059&name=you

If you did that, using GET method, I could easily enter whatever I wanted. This is where I could be mistaken, but even if you used the POST method, Couldn't I still take your code, and throw in a high score? Couldn't you just copy the page, edit it a bit with a hiddentag for highscore, and still pass it along.

Right or Wrong? Just my point of view.
Booooze is offline   Reply With Quote
Old Jul 4th, 2006, 8:14 PM   #22
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 763
Rep Power: 3 Jimbo is on a distinguished road
I think Eric is trying to keep as much as possible in the applet, in which case you'd have to reverse-compile it to get the code (I know it can be done, but I've never looked into it and don't know what it takes). If it was just an HTML form, things would be a bit simpler to mess with.
Jimbo is offline   Reply With Quote
Old Jul 5th, 2006, 9:58 PM   #23
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Quote:
Originally Posted by Booooze
What I dont get is that you make the game in java, pass the score to the php page (correct?)
Correct

Quote:
You redirect them to the page right?
No, your wrong. The applet is just going to send the score data to the URL. They wouldn't see me doing this.

After everyones help (thanks you). I realized that maybe calling a javascript method (to send the data to the php site would be better).

@Dawei, so the java Applet should call a javascript method (on the html page) which sends the data to my php server? Am I getting this right? Because PHP is the only server side programming I have access to.

Quote:
If you did that, using GET method, I could easily enter whatever I wanted. This is where I could be mistaken, but even if you used the POST method, Couldn't I still take your code, and throw in a high score? Couldn't you just copy the page, edit it a bit with a hiddentag for highscore, and still pass it along.
Again, this is a hidden action. They don't know that I'm doing this. They won't know what website i'm communicating with.
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Old Jul 5th, 2006, 11:14 PM   #24
Booooze
Expert Programmer
 
Booooze's Avatar
 
Join Date: Mar 2006
Location: Igloo
Posts: 710
Rep Power: 3 Booooze is on a distinguished road
Send a message via MSN to Booooze
aha. Makes a little more sense now.
Booooze is offline   Reply With Quote
Old Jul 5th, 2006, 11:31 PM   #25
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
JavaWorld: POSTing via Java

JavaWorld: POSTing via Java revisited

titaniumdecoy is offline   Reply With Quote
Old Jul 5th, 2006, 11:38 PM   #26
Eric the Red
Hobbyist Programmer
 
Eric the Red's Avatar
 
Join Date: Feb 2006
Posts: 214
Rep Power: 0 Eric the Red is an unknown quantity at this point
Quote:
Originally Posted by titaniumdecoy
I've been searching on end looking for something like this.

THANKS so much!!!!! You saved me from learning Javascript.

I guess Java can do pretty much anything
__________________
Death smiles at us all. All a man can do is smile back.
Eric the Red is offline   Reply With Quote
Old Jul 5th, 2006, 11:51 PM   #27
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 856
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
No problem.

I found the first link by typing "post java" in Google.
titaniumdecoy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:34 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC