Hack Forums
Wininet challenges in C/C++ - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5)
+---- Thread: Wininet challenges in C/C++ (/showthread.php?tid=5230562)



Wininet challenges in C/C++ - Sai Hung - Apr 8, 2016

Hey everyone

Wininet, thats where I am having sort of a battle today, suppose I want to call one of the win api to send to a php server after calling the internetOpen(), internetConnect(), httpopenRequest(), then it's the send request, but here I would be sending 2 parameters hence I wanted to craft it in this manner
Code
InternetOpen()
InternetConnect()
HttpOpenRequest()
bool res = HttpSendRequest(
            hFile,
            "Content-type: application/x-www-form-urlencoded",
            -1,      "firstname=%s&lastname=%s",fname,lname,
            dataLen
        );

Having confusions here as it's my first time trying out like this here, do I appear doing this correctly?