hi marc,
it's a weird behaviour, but I think I had track it down.
as I describe above for my own account it works without any problems, for a friends account it stops.
I debugged your lastfm function and looked at the responsecodes.
the request that returns nothing and results in stopping the process has the responsecode 12152 which means the server returns nothing.
so there is no responsetext in your function if status != 200 .
this 12152 response is something strange in msxmlhttp versions - i don't know... microsoft stuff
to solve this you just have recall the lastfm function on this responsecode and after a short hang the process runs till end.
here is the modified function with some traces:
function lastfm(qs, user_agent, func) {
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET", "http://ws.audioscrobbler.com/2.0/?api_key=" + api_key + "&username=" + username + qs + "&s=" + Math.random(), true);
fb.trace("http://ws.audioscrobbler.com/2.0/?api_key=" + api_key + "&username=" + username + qs)
xmlhttp.setRequestHeader('User-Agent',user_agent);
xmlhttp.send();
xmlhttp.onreadystatechange = function() {
fb.trace("readystate:"+xmlhttp.readyState)
if (xmlhttp.readyState == 4) {
fb.trace("status:"+xmlhttp.status)
fb.trace("statusText:"+xmlhttp.statusText)
if (xmlhttp.status == 200) {
func();
} else {
fb.trace("error readystate:"+xmlhttp.readyState)
fb.trace("error status:"+xmlhttp.status)
fb.trace("error statusText:"+xmlhttp.statusText)
fb.trace("error responsetext:"+xmlhttp.responsetext);
if(xmlhttp.status == 12152){
fb.trace("tryagain")
lastfm(qs, user_agent, func)
}
}
}
}
}
and here all MS error codes:
http://msdn.microsoft.com/en-us/library/aa383770(VS.85).aspx
and something here:
http://stackoverflow.com/questions/872206/...n-in-ms-xmlhttp
hope that helps.
cheers m.
edit: this strange responsecode happend around 6 times on downloading 700 pages. I think this happend randomly...