I am getting some sockreads truncated in a script.
The following line of HTML code is from a web site
<A NAME='1991401'></A> Definition</span></TD><TD ALIGN='right' VALIGN='baseline' WIDTH='5%'><SPAN class='fieldValue' style='font-size: 80%; font-weight: bold;'>1.</SPAN></TD><TD ALIGN='left' VALIGN='baseline' WIDTH='70%'><span class="fieldValue" STYLE="font-weight: normal;">a building in which people, esp. members of a family, reside.</span></TD></TR>
. And here is what my script returns from the same page -
<A NAME='1991401'></A> Definition</span></T
It's a lot shorter. Now, for some activities size isn't important but I think it does matter in this case. Furthermore, it doesn't always happen. Sometimes the full HTML line is successfully retrieved.
My question, then, is a general one. Is there a method to detect a 'broken' sockread? I have modified the code from the /sockread example in the help file eg
if ($sockerr > 0) return
if ($sockbr == 0) return
if (%temp == $null) %temp = -
echo 4 %temp
### my code goes here ###
Thanks for listening!