Try to sniff the connection -- there's something different going on in the encoding the web browser is using for the HTML form, and the the C++ client send. It may be really subtle, too -- the server might send a different Accept header when it's a PHP script, which generates different behaviour in the C++ program.
So, I'll repeat myself -- sniff the connection. Something different is going on, or it wouldn't be broken. Look for what's different, and it can be a clue in what needs to be fixed, and how to fix it. Debugging problems is more than just looking at symptoms and surface effects -- you need to dig into why something is happening, not just what is happening.
The only thing I can think of right now is that the server is sending headers that it accepts some sort of compression, or a language encoding that I'm not familiar with, but without knowing what's being sent between the two systems, I don't want to make a false diagnosis. (would you want a doctor to just glance at you for a few seconds, then tell you that you need to have a major organ internal removed?) (and, if you come away with learning how to trouble shoot these sorts of things, you don't have to come back and ask every time ... and might be able to help others, too.)
|