PDA

Click to See Complete Forum and Search --> : Recieve nore data


lol999
Aug 15th, 2000, 11:07 AM
In my Winsock dataarival i have something like this:

dim yaya as string

winsock1.getdata yaya


If InStr(1, yaya, "User Registration Confirmation") <> Then

msgbox "Confirmation OK"
Winsock1.Close
end if


winsock1.connect server, 80



Now, on some slow servers, the donwloaded data does get to finish so it cant find the "user registration" string that is at the bottom of the page. What can I put in data arival that will make sure the whole Document is finished before going on and connecting again with the winsock1.connect.

Any help is appreciated.

Crypt
Aug 16th, 2000, 05:55 PM
Hiya lol

ok I assume you are downloading this data from a webpage, in which case after the webpage has finished sending the data to your app it closes the connection.

so in your general declarations put something like:

Dim WebpageSource as string

then in your winsock data arrival,

dim yaya as string
winsock1.getdata yaya
webpagesource = webpagesource & yaya

then in your winsock close sub put:

If InStr(1, webpagesource, "User Registration Confirmation") <> Then
msgbox "Confirmation OK"
Winsock1.Close
end if
winsock1.connect server, 80


hope that helps.

lol999
Aug 17th, 2000, 02:08 PM
Thanks, it worked. My prog is running smooth!

Thanks for helping again. This is the second time :)