Solved

How to check google pr in delphi?

Posted on 2011-03-03
7
1,270 Views
Last Modified: 2012-05-11
Hello guys!
Please help me!

How can i get the pr rank of a website in delphi?
I need to do this without google make a ip ban.

Please help, if everyone know a solution, help.
thanks
0
Comment
Question by:helyonprime96
  • 4
  • 3
7 Comments
 
LVL 24

Accepted Solution

by:
jimyX earned 500 total points
ID: 35028541
You can use TWebBrowser to load the page and parse the text from there:
uses MSHTML;
...
procedure TForm1.Button1Click(Sender: TObject);
var
  Doc : IHTMLDocument2;
  Str:string;
begin
  if not Assigned(WebBrowser1.Document) then Exit; // also you can show a message here to indicate that the page has not yet completed loading
  Doc := (WebBrowser1.Document AS IHTMLDocument2);
  if Pos('points: ', Doc.Body.innerText) > 0 then
    begin
      Str := Doc.Body.innerText;
      delete(str,1,Pos('points: ',str)+length('points: ')-1);
      Label1.caption := copy(str,1,pos(' ',str)-1);
    end;
end;

Open in new window


You can go through this PAQ:
http://www.experts-exchange.com/Programming/Languages/Pascal/Delphi/Q_26801816.html
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35029236
If you have the page text loaded to a Memo then you can parse the text from the Memo as follows:
procedure TForm1.Button1Click(Sender: TObject);
var
  Str:string;
begin
  Str := memo1.Text;
  if Pos('points: ', Str) > 0 then
    begin
      delete(str,1,Pos('points: ',str)+length('points: ')-1);
      Showmessage(copy(str,1,pos(' ',str)-1));
    end;
end;

Open in new window

0
 
LVL 24

Expert Comment

by:jimyX
ID: 35035170
Do you require more help here?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:helyonprime96
ID: 35035236
no
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35035319
Did my comment answer your question?
0
 

Author Comment

by:helyonprime96
ID: 35035632
partialy, but thanks
0
 

Author Closing Comment

by:helyonprime96
ID: 35035633
thanks, man
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question