a loop constructing the URLs and make PHP to fetch up to 100 pages [ a seven liner]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dear list - good Morning!


i want to parse the site - and get the results out of it:

http://www.educa.ch/dyn/79363.asp?action=search

therefore i need to loop over the line 2 - don  i!?


 <?php
 $data = file_get_contents('http://www.educa.ch/dyn/79363.asp?action=search');
 $regex = '/Page 1 of (.+?) results/';
 preg_match($regex,$data,$match);
 var_dump($match);
 echo $match[1];
 ?>


in order to get the details of the pages - 

http://www.educa.ch/dyn/79376.asp?id=4438
http://www.educa.ch/dyn/79376.asp?id=53

and so forth - well i need a foreach statement in line two - don t i!? 


just help me with this seven-liner  ;)

on a sidenote: measuring code in terms of how many lines it took to write is 
a Perl-coder-attitude. Only Perl programmers care about that and i find it hard 
it is to read Perl code.

love to hear from you
___________________________________________________________
GRATIS! Movie-FLAT mit Ãber 300 Videos. 
Jetzt freischalten unter http://movieflat.web.de

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux