locked
Web .TXT saving question RRS feed

  • Question

  • Hey all! I was wondering if there is a way to save stuff into a Text file that is on the web with small basic. Like Network .upload file maybe?? Thanks!!

    A spark to start a fire is necessary. But mainly you need dry kindling.


    • Edited by Zock77Editor Saturday, December 22, 2012 11:53 PM
    Saturday, December 22, 2012 11:53 PM
    Answerer

Answers

  • There are extensions that can, but they rely on having the right permissions and usually server side software.  The simplest is a php script that takes arguments when loading a web page and does something with it, as you did before here.  Also the Fremy extension has FTP capabilities, again you need credentials.  Of course any credentials you use will be in your source and therefore anyone can see them.


    • Edited by litdev Sunday, December 23, 2012 11:00 AM
    • Marked as answer by Zock77Editor Sunday, December 23, 2012 6:07 PM
    Sunday, December 23, 2012 10:19 AM

All replies

  • I would guess not because then Small Basic programmers could accidentally upload and overwrite files on other websites unintentionally, but nonetheless harmfully, and could cause major problems. So you can see why it might not be such a good idea.

    I am a 10 year old that loves math, games, and computers. 'Binary is as easy as 1, 10, 11.'

    • Proposed as answer by Math Man Sunday, December 23, 2012 3:29 AM
    • Unproposed as answer by Math Man Sunday, December 23, 2012 7:43 PM
    Sunday, December 23, 2012 3:29 AM
  • There are extensions that can, but they rely on having the right permissions and usually server side software.  The simplest is a php script that takes arguments when loading a web page and does something with it, as you did before here.  Also the Fremy extension has FTP capabilities, again you need credentials.  Of course any credentials you use will be in your source and therefore anyone can see them.


    • Edited by litdev Sunday, December 23, 2012 11:00 AM
    • Marked as answer by Zock77Editor Sunday, December 23, 2012 6:07 PM
    Sunday, December 23, 2012 10:19 AM
  • OK Thanks! That's all I needed to know!

    A spark to start a fire is necessary. But mainly you need dry kindling.

    Sunday, December 23, 2012 6:08 PM
    Answerer
  • I have written a very simple extension to upload game scores to a web site for players of a game to share high scores - extension uploaded in usual place.

    Syntax like:

    result = LDHighScore.Upload("MyGame","Mary",1000)
    TextWindow.WriteLine("User "+result[1]+" has high score "+result[2])

    The parameters are the unique game name, user name and the score.

    You don't need a website - I just do the store/retrieve on one of mine.

    It returns an array with the highest score user and the high score for the game.

    • Edited by litdev Sunday, December 23, 2012 8:45 PM
    Sunday, December 23, 2012 6:37 PM
  • Is there any way you could put a password on there too??

    (so that people don't go putting there high scores on there without playing the game)


    A spark to start a fire is necessary. But mainly you need dry kindling.

    Saturday, December 29, 2012 4:58 PM
    Answerer
  • Problem with passwords is you have to put them in your code too!  The game name couple be any character string, not required  to be the game name, but still can be seen in the code.  Any ideas how this might work - I can always remove cheat scores but another way would be best.

    PS I have moved this method to a LDNetwork.HighScore

    • Edited by litdev Saturday, December 29, 2012 7:11 PM
    Saturday, December 29, 2012 6:11 PM
  • Okay!! thanks!

    A spark to start a fire is necessary. But mainly you need dry kindling.

    Saturday, December 29, 2012 10:04 PM
    Answerer