Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to check google pr in delphi?

Posted on 2011-03-03
7
Medium Priority
?
1,291 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 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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Make the most of your online learning experience.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Starting up a Project
Screencast - Getting to Know the Pipeline

810 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