Your test seems puzzling. Running exactly what you gave always gives 4558, but then you talk about libURL, which you haven't used. Is there a different script we're supposed to compare against?