Solved

How to check google pr in delphi?

Posted on 2011-03-03
7
1,238 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
Comment Utility
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
Comment Utility
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
Comment Utility
Do you require more help here?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:helyonprime96
Comment Utility
no
0
 
LVL 24

Expert Comment

by:jimyX
Comment Utility
Did my comment answer your question?
0
 

Author Comment

by:helyonprime96
Comment Utility
partialy, but thanks
0
 

Author Closing Comment

by:helyonprime96
Comment Utility
thanks, man
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This is an explanation of a simple data model to help parse a JSON feed
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now