JSON-based superobject (16): instance-resolution Google Keyword search ranking

Source: Internet
Author: User
Similar to the preceding example, use 'HTTP: // clients1.google.cn/complete/search? & Q = '+ "keyword" to obtain the Google Keyword search ranking.

The result obtained by using Delphi as the keyword 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"], ["Delphi string function", "352,000 results", "5"], ["Delphi7 serial number", "302,000 results ", "6"], ["delphi2009 download", "20,600 results", "7"], ["Delphi7", "1,330,000 results", "8"], ["delphi2009 official Version Download", "5,710 results", "9"])

  

The preceding result is in window. google. AC. H (...) the following operation is to give isuperobject a name named "window. google. AC. h.

Run:


Code File:
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) memo1: tmemo; edit1: tedit; button1: tbutton; Procedure button1click (Sender: tobject); end; var form1: tform1; implementation {$ R *. DFM} uses MSXML, superobject; function toutf8encode (STR: string): string; var B: byte; begin for B in bytesof (utf8encode (STR) do r Esult: = format ('% S %. 2x ', [result,' % ', B]); end; Procedure proc (const this, Params: isuperobject; var result: isuperobject); var JO: isuperobject; begin form1.memo1. clear; for Jo In Params ['1'] Do With form1.memo1. lines do form1.memo1. lines. add (Jo. format ('% 2%: % 0%-% 1%'); end; Procedure tform1.button1click (Sender: tobject); const u = 'HTTP: // clients1.google.cn/complete/search? & Q = '; var JO: isuperobject; Req: ixmlhttprequest; Url: widestring; begin JO: = 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.
 
  
 

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.