RakNet has TCPInterface and HTTPConnection classes. I'm trying to make a call to a php page passing in a query string but it's not working. The final result should be data in a database but after I run it from C++ using RakNet there is no db entry. If I just use the url in a browser then there is an entry. So it's something to do with how I'm calling this from RakNet.
This works in a browser
This doesn't work (no error just no db entry) in C++ using RakNet
TCPInterface *tcp = RakNet::OP_NEW<TCPInterface>(__FILE__, __LINE__); tcp->Start(0, 64); HTTPConnection* http = RakNet::OP_NEW<HTTPConnection>(__FILE__, __LINE__); http->Init(tcp, "localhost"); http->Update(); http->Post("/MyWebApp/gnet.php", "?opt=add&game=MyGame&server=mygame.net"); RakString data; data = http->Read(); http->HasBadResponse(NULL, &data);