void SendFile(TCHAR *szFilePath,TCHAR *szFileName) { CHttpClient objHttpReq ; CHttpResponse * pobjHttpRes = NULL ; try { // Initialize the User Agent objHttpReq.SetInternet (_T ("YaSync CR")) ; // Add user's custom HTTP headers /*objHttpReq.AddHeader (_T ("Ryeol-Magic"), _T ("My Magic Header")) ; objHttpReq.AddHeader (_T ("User-Magic"), _T ("User's Magic Header")) ;*/ // Add user's parameters objHttpReq.AddParam (_T ("FileName"), szFileName) ; // Specifies a file to upload objHttpReq.AddParam (szFileName,szFilePath, CHttpClient::ParamFile); // Start a new request objHttpReq.BeginUpload (_T ("http://a.mobitnt.com/cr.php")) ; // Specifies the number of bytes to send when the Proceed method is called. const DWORD cbProceed = 1024 ; // 1K do { int i = 0; } while ( !(pobjHttpRes = objHttpReq.Proceed (cbProceed)) ) ; } catch (httpclientexception e) { } }
void SendSupportReq(TCHAR *szEmail,TCHAR *szProblem) { CHttpClient objHttpReq ; CHttpResponse * pobjHttpRes = NULL ; try { // Initialize the User Agent objHttpReq.SetInternet (_T ("YaSync CR")) ; // Add user's custom HTTP headers /*objHttpReq.AddHeader (_T ("Ryeol-Magic"), _T ("My Magic Header")) ; objHttpReq.AddHeader (_T ("User-Magic"), _T ("User's Magic Header")) ;*/ // Add user's parameters objHttpReq.AddParam (_T ("EMAIL"), szEmail); objHttpReq.AddParam (_T ("PROBLEM"), szProblem); // Start a new request objHttpReq.BeginPost (_T ("http://a.mobitnt.com/supportReq.php")) ; // Specifies the number of bytes to send when the Proceed method is called. const DWORD cbProceed = 1024 ; // 1K do { int i = 0; } while ( !(pobjHttpRes = objHttpReq.Proceed (cbProceed)) ) ; } catch (httpclientexception e) { } }