In a simple game of mine, I created a high score table that included both one's personal high scores and high scores posted up on a website. On the website, the scores are kept in a simple text file. I used the following code to bring the scores down from the site and put them in arrays:
tcp = OpenTCPStream("www.alloidgames.com",80)
If tcp Then
WriteLine tcp,"GET http://www.alloidgames.com/raingamehs.txt"
WriteLine tcp,Chr$(10)
If Not Eof(tcp) Then
While Not Eof(tcp)
For i = 1 To 10
olscore(i) = ReadLine(tcp)
olname$(i) = ReadLine$(tcp)
ollevel(i) = ReadLine(tcp)
Next
Wend
End If
CloseTCPStream tcp
End If
So far, I've only been able to figure out how to get high scores going one way. Is there any way, after comparing the recent score to the lowest high score from online (olscore(10)), to have the game send the score up to the text file or to the site? The goal would be for players to post their own scores on the site automatically, without allowing them to alter their scores. If this is not directly possible, what are some other ways to possible communicate the score information? Could I have the game send an e-mail automatically with the score in it, without allowing the player to edit the e-mail?
tcp = OpenTCPStream("www.alloidgames.com",80)
If tcp Then
WriteLine tcp,"GET http://www.alloidgames.com/raingamehs.txt"
WriteLine tcp,Chr$(10)
If Not Eof(tcp) Then
While Not Eof(tcp)
For i = 1 To 10
olscore(i) = ReadLine(tcp)
olname$(i) = ReadLine$(tcp)
ollevel(i) = ReadLine(tcp)
Next
Wend
End If
CloseTCPStream tcp
End If
So far, I've only been able to figure out how to get high scores going one way. Is there any way, after comparing the recent score to the lowest high score from online (olscore(10)), to have the game send the score up to the text file or to the site? The goal would be for players to post their own scores on the site automatically, without allowing them to alter their scores. If this is not directly possible, what are some other ways to possible communicate the score information? Could I have the game send an e-mail automatically with the score in it, without allowing the player to edit the e-mail?