Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to check google pr in delphi?

Posted on 2011-03-03
7
Medium Priority
?
1,289 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 24

Accepted Solution

by:
jimyX earned 1500 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project
Suggested Courses

609 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