频道分类

Delphi 利用51.la统计程序使用量

作者:admin 来源: 日期:2020/2/8 13:09:36 人气: 标签:

 
procedure Tfrm_main.webcount;
var
  s:array[0..100] of Char;
  winpath:array[0..MAX_PATH] of Char;
  mem:TMemoryStream;
begin
  GetWindowsDirectory(winpath,SizeOf(winpath));
  s:='<script language="javascript" type="text/javascript" src="http://js.users.51.la/xxxxx.js"></script>';
  mem:=TMemoryStream.Create;
  mem.Write(s,SizeOf(s));
  mem.SaveToFile(winpath+'\temp.html');
  mem.Free;
  web.Navigate(winpath+'\temp.html');
  DeleteFile(winpath+'\temp.html');
end;