curl is a good tool, I choosed to use fsoekopen because it’s lightweight and flexible. But I didn’t consider the aspect of HTTP redirects indeed, so I had switched the request provider from fsockopen to curl.

As for the HTTP challenge, I had forced the challenge to be accomplished via http.