"; //print url $handle = fopen($fn, "r"); //open web page file $filestr = fread($handle, 1024); //read top part of html fclose($handle); //clos web page file if (preg_match("/.+<\/title>/i",$filestr,$title)) { //get page title echo substr($title[0], 7, strpos($title[0], '/')-8); //print title } else { echo "No title"; } echo "</a></li><br>\n"; //finish html } // main function that scans the directory tree for web pages function listdir($basedir){ if ($handle = @opendir($basedir)) { while (false !== ($fn = readdir($handle))){ if ($fn != '.' && $fn != '..' && $fn != 'stats' && $fn != 'thank-you.php' && $fn != 'kontakt.php'){ // ignore these $dir = $basedir."/".$fn; if (is_dir($dir)){ listdir($dir); // recursive call to this function } else { //only consider .html etc. files if (preg_match("/[^.\/].+\.(htm|html|php)$/",$dir,$fname)) { printlink($fname[0]); //generate the html code } } } } closedir($handle); } } // function call listdir($basedir); //this line starts the ball rolling ?> </div> </div> </div> <!-- end #content --> <div id="sidebar"> <ul> <li> <h2>Offshore země</h2> <ul> <li><a href="http://offshore-limite.com/offshore.php">Seychelly</a></li> <li><a href="http://offshore-limite.com/offshore.php#Belize">Belize</a></li> <li><a href="http://offshore-limite.com/offshore.php#Kypr">Kypr</a></li> <li><a href="http://offshore-limite.com/offshore.php#Panama">Panama</a></li> <li><a href="http://offshore-limite.com/offshore.php#USA">USA</a></li> <li><a href="http://offshore-limite.com/offshore.php#VB">Velká Británie</a></li> <li><a href="http://offshore-limite.com/offshore.php#BPO">Britské Panenské ostrovy</a></li> <li><a href="http://offshore-limite.com/offshore.php#Gibraltar">Gibraltar</a></li> <li><a href="http://offshore-limite.com/offshore.php#HK">Hong Kong</a></li> <li><a href="http://offshore-limite.com/offshore.php#Mauritius">Mauritius</a></li> <li><a href="http://offshore-limite.com/offshore.php#Švýcarsko">Švýcarsko</a></li> </ul> </li> </ul> <h2>Kontakt</h2> <br/> <p>J&C LEGAL.LLC<br/> 3411 Silverside Road,<br> Rodney Bldg, Ste 104,<br/> Wilmington, DE, 19810,<br> County of New Castle,<br/> Delaware USA<br/></p><br/> <p>Zastoupení pro ČR.:</p> <p>GENERAL IMPORT spol.s r.o.<br/> Perucká 2481/5<br/> Praha 2<br/> PSČ 120 00<br/> <a href="mailto:info@offshore-limite.com">info@offshore-limite.com</a> </p> </div> <!-- end #sidebar --> <div class="clear"></div> </div> </div> </div> <!-- end #page --> </div> <div id="lista" class="class1" ><p>Copyright (c) 2011 <a href="http://offshore-limite.com/">offshore-limite.com</a>. All rights reserved. Design by <a href="http://sw-hw.cz/">SW-HW</a>.</p></div> </body> </html>