- Joined
- Mar 26, 2012
- Messages
- 1,465
- Reaction score
- 130
PHP:
HINTERNET hInternet, hFile;
DWORD rSize;
char buffer[47];
hInternet = InternetOpen(NULL, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
if (hFile = InternetOpenUrl(hInternet, "http://icanhazip.com/", NULL, 0, INTERNET_FLAG_RELOAD, 0)){
InternetReadFile(hFile, &buffer, sizeof(buffer), &rSize);
buffer[rSize] = '\0';
InternetCloseHandle(hFile);
}
char *data = "ip=", buffer;
My intent is to add external IP address, Mac Address, Computer Name to char *data by something similar as char *data = "ip=" buffer "&mac=" mac "&pc_name=" pcname or something very similar. Any help would be greatly appreciated because this is new territory for myself trying to code this correctly. Thank you.