Hello.. i am werkin on a simple web server. (cuz i'm bored)
It uses a winsock control to accept/recieve/send data.
Now.. i can get it to send html documents perfectly... but i cant seem to get it to send images. is there a specific way that an image has to be sent to a web browser?
the command i get from the browser is always...
GET /main.jpg HTTP/1.1
the code i'm using to send is basicly this..
oh yea.. i b runnin windows 2000 pro. bcuz it b tyteCode:Dim f, textda, cha, data_read$, filename
On Error Resume Next
filename = "c:\documents and settings\administrator\desktop\webserver\main.jpg"
'note to who all read this... the file is physicly in the folder!!!!
f = FreeFile
textda = ""
If FileExists(filename) Then
If Len(filename) Then
Open filename For Input As #f ' Open file.
Do While Not EOF(f)
cha = Input(1, #f) ' Get one character.
textda = "" & textda & cha
Loop ' Loop if not end of file.
Close #f
End If
data_read$ = textda
End If
sckWS(1).SendData data_read$
i have no clue.. maybe sumone could shine sum light on this.. thanx alot!
