Login   Register  
PHP Classes
elePHPant
Icontem

How to use

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      guaranix Rank  >  All threads  >  How to use  >  (Un) Subscribe thread alerts  
Subject:How to use
Summary:Trying to use this class
Messages:9
Author:Paul Poisson
Date:2006-10-11 15:45:24
Update:2011-02-14 11:42:09
 

  1. How to use   Reply   Report abuse  
Picture of Paul Poisson
Paul Poisson
2006-10-11 15:45:24
I am a sort of newbe. I have wired up this class and everything executes correctly, now how do I use this with my own site to get the page rank? Or am I not on the same page?

  2. Re: How to use   Reply   Report abuse  
Picture of Cesar D. Rodas
Cesar D. Rodas
2006-10-11 16:30:06 - In reply to message 1 from Paul Poisson
Ok. The first thing you have to do is to try to craw (download pages from internet) and save the links in a table (mysql db table) called pagerank with the next struct:
CREATE TABLE `pagerank` (
`master` int(11) NOT NULL default '0',
`slave` int(11) NOT NULL default '0',
KEY `m` (`master`),
KEY `s` (`slave`)
);

Suppose that you Craw a Page A that have a link to a Page B. So you have to insert into the table pagerank the next SQL:

insert into pagerank(master,slave) values('Page A ID','Page B ID');

Note: The Page A and Page B ID need tobe transform to an number with a Hash function or saving all the links into another table with an autoincrement number ID.

Undestand?

For the next week i will do an complet example with a craw system.

  3. Re: How to use   Reply   Report abuse  
Picture of Abhinav
Abhinav
2006-12-03 15:41:05 - In reply to message 2 from Cesar D. Rodas
i used dummy values in craw db ( like 1 master 2 slave 1 master again and 3 slave)... it tells :
Preparing...
Fatal error: Maximum execution time of 60 seconds exceeded in F:\xampp\xampp\htdocs\rank\gRank.php on line 69
linbe 69 = while ($row = mysql_fetch_array($main))
...

Wat am i doing wrong...

  4. Re: How to use   Reply   Report abuse  
Picture of Cesar D. Rodas
Cesar D. Rodas
2006-12-03 23:32:35 - In reply to message 3 from Abhinav
Ok, you need to put in the begining "set_time_limit(0);" that error is because the php execution time is limited to 60 seconds. So if you need to run a large PHP you need to give a new maximum time with "set_time_limit( time )".

If time is 0 that means for ever.


  5. Re: How to use   Reply   Report abuse  
Picture of Jimmy Chadha
Jimmy Chadha
2006-12-21 07:03:32 - In reply to message 4 from Cesar D. Rodas
Hey,

Nice class, but can't you make in built crawler within this script sothat it would be more convenient to use it practically


  6. Re: How to use   Reply   Report abuse  
Picture of Cristian
Cristian
2007-10-26 09:56:51 - In reply to message 5 from Jimmy Chadha
yes please ... as Jimmy Chadha said .. can you make a built in crawler with it ? or a tutorial for this? thanks!

  7. Re: How to use   Reply   Report abuse  
Picture of dfg
dfg
2011-02-14 11:42:01 - In reply to message 4 from Cesar D. Rodas
Is it really works? I canīt make it useable. Where should i insert the web addresses? There are only numbers, but if i changed them to urls, it didnīt work.

  8. Re: How to use   Reply   Report abuse  
Picture of dfg
dfg
2011-02-14 11:42:20 - In reply to message 4 from Cesar D. Rodas
Is it really works? I canīt make it useable. Where should i insert the web addresses? There are only numbers, but if i changed them to urls, it didnīt work.

  9. Re: How to use   Reply   Report abuse  
Picture of dfg
dfg
2011-02-14 11:42:21 - In reply to message 4 from Cesar D. Rodas
Is it really works? I canīt make it useable. Where should i insert the web addresses? There are only numbers, but if i changed them to urls, it didnīt work.