XE3 essay 18: Examples-resolving Google keyword search rankings

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.