This site requires JavaScript, please enable it in your browser!
Greenfoot back
niklaskar
niklaskar wrote ...

2012/6/10

Call to an URL

niklaskar niklaskar

2012/6/10

#
Hey, in my Scenario i would like to post the highscores on the internet, where i have a php skript, that manages the highscores. To do this I need to call an URL thast formed like this: http://www.example.com/score.php?score=1234&name=niklas The URL should be accessed in the Background, so that the user gets no notice of it. How can I achieve this with Greenfoot?
mjrb4 mjrb4

2012/6/10

#
See here for an example of accessing a URL and printing the output: http://docs.oracle.com/javase/tutorial/networking/urls/readingURL.html Note though that this code won't work on the gallery. A better alternative might be to use Greenfoot's built in support for such things... :-)
You need to login to post a reply.