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.
For the next week i will do an complet example with a craw system.
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 :
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))
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 )".