Since it requires lots of string manipulation and doesn't really need speed-optimized code, using C++ for that would be quite unproductive. Best is to use a script language - my personal preference is perl with WWW::Curl (due to the string manipulation part) but you can also use python-pycurl, which is on the repositories.