maybe this can help:
http://forum.thegamecreators.com/?m=forum_view&t=62127&b=6
it's in the "DBPRO - Online Highscore - Using PHP". (the dbc is two post beneath that post)
if you can't find it, i will post it here:
SCORE = 100+RND(9999)
name$ = "test"
print "got data"
set window on
FTP CONNECT "server", "login", "password"
FTP GET FILE "list.txt", "list.txt"
print "got ftp file"
DIM highscore$(40,4)
DIM oldhscore$(40,4)
OPEN TO READ 1, "list.txt"
FOR x = 1 TO 20
READ STRING 1, T$
`get score
highscore$(x,1) = LEFT$( T$, 7 )
oldhscore$(x,1) = highscore$(x,1)
`get name
T2$ = RIGHT$( T$, LEN(T$)-12 )
T3$ = LEFT$( T2$, 8 )
highscore$(x,2) = T3$
oldhscore$(x,2) = T3$
`get date
T2$ = RIGHT$( T$, LEN(T$)-25 )
T3$ = LEFT$( T2$, 8 )
highscore$(x,3) = T3$
oldhscore$(x,3) = T3$
`get time
T2$ = RIGHT$( T$, 8 )
highscore$(x,4) = T2$
oldhscore$(x,4) = T2$
NEXT x
CLOSE FILE 1
print "got highscore list"
FOR x = 1 TO 20
highscore = val(highscore$(x,1))
IF SCORE => highscore
_t = x
score_ = len(str$(SCORE))
score1$ = str$(SCORE)
REPEAT
score2$ = score2$ + "0"
UNTIL LEN(score1$+score2$) = 7
score3$ = score2$+score1$
REPEAT
name2$ = name2$ + "."
UNTIL LEN(name$+name2$) = 8
name3$ = name2$ + name$
highscore$(_t,1) = score3$
highscore$(_t,2) = name3$
highscore$(_t,3) = GET DATE$()
highscore$(_t,4) = GET TIME$()
EXIT
ENDIF
NEXT x
print "got new data"
FOR t = _t+1 TO 20
highscore$(t,1) = oldhscore$(t-1,1)
highscore$(t,2) = oldhscore$(t-1,2)
highscore$(t,3) = oldhscore$(t-1,3)
highscore$(t,4) = oldhscore$(t-1,4)
NEXT t
print "got new list"
DELETE FILE "list.txt"
OPEN TO WRITE 1, "list.txt"
FOR x = 1 TO 20
WRITE STRING 1, highscore$(x,1)+" "+highscore$(x,2)+" "+highscore$(x,3)+" "+highscore$(x,4)
NEXT x
CLOSE FILE 1
print "wrote new list"
FTP DELETE FILE "list.txt"
FTP PUT FILE "list.txt"
print "uploaded new list"
DELETE FILE "list.txt"
FTP DISCONNECT
UNDIM highscore$()
UNDIM oldhscore$()
print "done"
