Here is another little piece.
In the return from the API a count of the number of cams on line that meet your criteria is included.
So, if you did not include any gender or tag parameter you would see the total number of cams online at that time.
If you included a gender parameter, you would see the total number of cams for that gender. Same for tags.
So, even if you are limiting your results by using the limit parameter you get to see the total number of cams that are available for that query.
That combined with the limit parameter and the offset parameter allows you to be able to create an effective pagination routine.
The total count is the first element in the xml:
Code:
<response>
<count>9439</count>
<results>
<resource>
<username>
...........
You can get at the count by using the getElementsByTagName() function.
for example:
camcount=xmlDoc.getElementsByTagName("count")[0].childNodes[0].nodeValue;
.