QQ Nickname control software update code, easy to use.
#include <windows. H> #include <stdio. h> #pragma comment (lib, "Wininet.lib") #include <wininet.h> int main () {hinternet hinternet=null; Hinternet Hconnect=null;char Sztext[512]={0};char *szaccept= "Accept: */*\r\n\r\n"; char szurl[1024]; strcpy (SZURL, " http://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?uins=123456 ");//Your Qqdword dwreadlen=0;__try{hinternet= InternetOpen ("mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) ", 0,null,null,0); if (!hinternet) __leave; Hconnect=internetopenurl (Hinternet,szurl,szaccept,strlen (szaccept), internet_flag_dont_cache| internet_flag_pragma_nocache| internet_flag_reload,0); if (!hconnect) __leave; InternetReadFile (Hconnect,sztext,512,&dwreadlen);} __finally{if (hinternet) InternetCloseHandle (hinternet); if (hconnect) InternetCloseHandle (hconnect);} Char *start=strstr (sztext, "nickname");//If your nickname is not equal to this nickname hint expires if (!start) {{MessageBox (NULL, "current version expired", "", NULL); ShellExecute (NULL, "open", "http://www.baidu.com/gengxin.asp", NULL,NULL,SW_show);//Jump Update}exitprocess (0);} return 0;}
QQ Nickname control software update