Similar to the example above, Google's keyword search rankings can be obtained by ' http://clients1.google.cn/complete/search?&q= ' + ' keywords '.
I use the Delphi keyword to get the result is:
Window.google.ac.h ([" Delphi", [ ["Delphi Tutorial", "375,000 results", "0"], ["Delphi Box", "74,900 results", "1"], [" Delphi Download "," 1,580,000 results "," 2 "], [" Delphi7 download "," 1,600,000 results "," 3 "], [" What Is Delphi "," 497,000 results "," 4 "], [" De Lphi string function "," 352,000 result "," 5 "], [" Delphi7 serial Number "," 302,000 result "," 6 "], [" delphi2009 download "," 20,600 result "," 7 "], [" De Lphi7 "," 1,330,000 results "," 8 "], [" delphi2009 official version download "," 5,710 results "," 9 "] ] )
The above results are given in the form of window.google.ac.h (...), the following is the key to give Isuperobject a method called "Window.google.ac.h", and point to the custom process, and in the process to complete the resolution.
Run:
Code files:
UnitUnit1;InterfaceusesWindows, Messages, sysutils, variants, Classes, Graphics, Controls, Forms, Dialogs, Stdctrls;typeTForm1 =class(Tform) Memo1:tmemo; Edit1:tedit; Button1:tbutton;procedureButton1Click (Sender:tobject);End;varForm1:tform1;Implementation{$R *.DFM}usesMsXML, Superobject;functionToutf8encode (str:string):string;varB:byte;begin forBinchBytesof (Utf8encode (str)) DoResult: = Format ('%s%s%.2x ', [Result,'% ', b]);End;procedureProc (Constthis, params:isuperobject;varResult:isuperobject);varJo:isuperobject;beginForm1.Memo1.Clear; forJoinchparams[' 1 '] Do withForm1.Memo1.Lines DoFORM1.MEMO1.LINES.ADD (Jo.format ('%2%:%0%-%1% '));End;procedureTform1.button1click (Sender:tobject);ConstU =' http://clients1.google.cn/complete/search?&q= ';varJo:isuperobject; Req:ixmlhttprequest; url:widestring;beginJO: = so; Jo. m[' window.google.ac.h ']: = @Proc; URL: = U + toutf8encode (edit1.text); Req: = coxmlhttp.create; Req.open (' Get ', URL, False, Emptyparam, Emptyparam); Req.send (Emptyparam); Jo[req.responsetext];End;End.
XE3 essay 18: Examples-resolving Google keyword search rankings