I was bored, and I was testing Lucas W's download function, so I made a yo momma program that downloads a text file with a bunch of yo momma jokes in it from my website and displays them. It deletes the downloaded text file after it loads the jokes:
Dim Yomama$(500)
Dim Num(0)
Randomize timer()
Download_Yomama("http://www.ufogames.galekus.com/Stuff/yomomma.txt")
Load_Yomama()
set text font "arial"
Do
Set text size 25
Center text 320,20,"Yo momma joke program. Press enter for a yo momma joke."
REpeat
num = rnd(num(0)+1)
Until yomama$(num) <> ""
set text size 12
Center text 320,200,"Number:"+str$(num)+" "+yomama$(num)
suspend for key
cls
Loop
Function Load_Yomama()
Open to read 1,"Yomomma.txt"
num(0) = 1
Repeat
Read string 1,yomama$
Yomama$(num(0)) = yomama$
REad string 1,yomama$
Yomama$(num(0)) = yomama$
num(0) = num(0) + 1
Until file end(1)
Close file 1
Delete file "yomomma.txt"
Endfunction
Function Download_Yomama( URL$ )
`Function by Lucas W
` get file name and destination
size = len( url$ ) : d=0
repeat
inc s, 1 : st$ = right$( url$, s ) : c$ = mid$( st$, 1 )
if c$ = "/"
filename$ = right$( url$, s-1 ) : d=1
endif
until d=1
destination$ = get dir$()+""+filename$
` download file
load dll "urlmon", 1
result = call dll(1, "URLDownloadToFileA", 0, url$, destination$, 0, 0)
delete dll 1
EndFunction
Compressed, this would fit the requirements, but I don't feel like it