rendered paste body<?// web sites loopfor ($i = 0; $i < count($smap); $i++) { Echo "Working on Web Site ID #".$smap[$i]['id']."<br>"; $xmlfile1 = "/www/sitemap-" . $smap[$i]['id'] . "-page1.php"; $xmlfile2 = "/www/sitemap-" . $smap[$i]['id'] . "-page2.php"; $xmlfile3 = "/www/sitemap-" . $smap[$i]['id'] . "-page3.php"; $xmlfile4 = "/www/sitemap-" . $smap[$i]['id'] . "-page4.php"; $xmlfile5 = "/www/sitemap-" . $smap[$i]['id'] . "-page5.php"; $xmlfile6 = "/www/sitemap-" . $smap[$i]['id'] . "-page6.php"; $xmlfile7 = "/www/sitemap-" . $smap[$i]['id'] . "-page7.php"; $xmlfile8 = "/www/sitemap-" . $smap[$i]['id'] . "-page8.php"; $xmlfile9 = "/www/sitemap-" . $smap[$i]['id'] . "-page9.php"; $xmlfile10 = "/www/sitemap-" . $smap[$i]['id'] . "-page10.php"; $fh1 = fopen($xmlfile1, 'w') or die("can't open"); for ($f = 0; $f < count($smap[$i]['general']); $f++) { if ($f == 0) { $stringData .= "<b>General Pages</b><br>"; } // general links Echo "Text:".$smap[$i]['general'][$f][0]." Link:".$smap[$i]['general'][$f][1]."<br>"; $stringData .= "• <a href=" . $smap[$i]['general'][$f][1] . " class=sitemap-link>" . $smap[$i]['general'][$f][0] ."</a><br>"; $count2++; echo '...' . $count2 . '...'; if ($count2 < 100) { fwrite($fh1, $stringData); $stringData = ''; } if ($count2 == 100) { echo "<br>Hit 100<br>"; if ($count2 > 100) { fwrite($fh1, $stringData); $stringData = ''; fclose($fh1); } } if ($count2 == 200) { echo "<br>Hit 200<br>"; fwrite($fh2, $stringData); $stringData = ''; fclose($fh2); } if ($count2 == 300) { echo "<br>Hit 300<br>"; fwrite($fh3, $stringData); $stringData = ''; fclose($fh3); } }// echo count($smap[$i]['general']); for ($g = 0; $g < count($smap[$i]['locations']); $g++) { $vacationrental = ''; $hotel = ''; $studio = ''; $onebedroom = ''; $twobedroom = ''; $threebedroom = ''; $fourbedroom = ''; $privatehome = ''; $sitelinks = ''; // location Echo "Location:".$smap[$i]['locations'][$g]."<br>"; for ($s = 0; $s < count($smap[$i]['location_links'][$smap[$i]['locations'][$g]]); $s++) { // location links Echo "Text:".$smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0]." Link:".$smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][1]."<br>"; $site = strtolower($smap[$i]['locations'][$g]); if (!$place) { $place = substr($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 0, 4); } $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 'Vacation Rentals'); if (($bed) && (!$vacationrental)) { $stringData .= "<br><b>Vacation Rentals</b><br>"; $vacationrental = 1; $place = ''; } $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 'Hotels'); if (($bed) && (!$hotel)) { $stringData .= "<br><b>Hotels</b><br>"; $hotel = 1; } $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 'Studio'); if (($bed) && (!$studio)) { $stringData .= "<br><b>Studios</b><br>"; $studio = 1; } $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 'One-Bedroom'); if (($bed) && (!$onebedroom)) { $stringData .= "<br><b>One-Bedroom</b><br>"; $onebedroom = 1; } $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 'Two-Bedroom'); if (($bed) && (!$twobedroom)) { $stringData .= "<br><b>Two-Bedroom</b><br>"; $twobedroom = 1; } $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 'Three-Bedroom'); if (($bed) && (!$threebedroom)) { $stringData .= "<br><b>Three-Bedroom</b><br>"; $threebedroom = 1; } $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 'Four-Bedroom'); if (($bed) && (!$fourbedroom)) { $stringData .= "<br><b>Four-Bedroom</b><br>"; $fourbedroom = 1; } $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0], 'Private Homes'); if (($bed) && (!$privatehome)) { $stringData .= "<br><b>Private Homes</b><br>"; $privatehome = 1; }/* $bed = strpos($smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][1], $site.'-'); if (($bed) && (!$sitelinks)) { $stringData .= "<br><b>Content Pages</b><br>"; $sitelinks = 1; }*/ $stringData .= "• <a href=" . $smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][1] . " class=sitemap-link>" . $smap[$i]['location_links'][$smap[$i]['locations'][$g]][$s][0] ."</a><br>"; $count2++; echo '...' . $count2 . '...'; if ($count2 == 100) { echo "<br>Hit 100<br>"; fopen($xmlfile1, 'a') or die("can't open"); fwrite($fh1, $stringData); $stringData = ''; fclose($fh1); } if ($count2 == 200) { $fh2 = fopen($xmlfile2, 'w') or die("can't open"); echo "<br>Hit 200<br>"; fwrite($fh2, $stringData); $stringData = ''; fclose($fh2); } if ($count2 == 300) { $fh3 = fopen($xmlfile3, 'w') or die("can't open"); echo "<br>Hit 300<br>"; fwrite($fh3, $stringData); $stringData = ''; fclose($fh3); } if ($count2 == 400) { $fh4 = fopen($xmlfile4, 'w') or die("can't open"); echo "<br>Hit 400<br>"; fwrite($fh4, $stringData); $stringData = ''; fclose($fh4); } if ($count2 == 500) { $fh5 = fopen($xmlfile5, 'w') or die("can't open"); echo "<br>Hit 500<br>"; fwrite($fh5, $stringData); $stringData = ''; fclose($fh5); } if ($count2 == 600) { $fh6 = fopen($xmlfile6, 'w') or die("can't open"); echo "<br>Hit 600<br>"; fwrite($fh6, $stringData); $stringData = ''; fclose($fh6); } if ($count2 == 700) { $fh7 = fopen($xmlfile7, 'w') or die("can't open"); echo "<br>Hit 700<br>"; fwrite($fh7, $stringData); $stringData = ''; fclose($fh7); } if ($count2 == 800) { $fh8 = fopen($xmlfile8, 'w') or die("can't open"); echo "<br>Hit 800<br>"; fwrite($fh8, $stringData); $stringData = ''; fclose($fh8); } if ($count2 == 900) { $fh9 = fopen($xmlfile9, 'w') or die("can't open"); echo "<br>Hit 900<br>"; fwrite($fh9, $stringData); $stringData = ''; fclose($fh9); } if ($count2 == 1000) { $fh10 = fopen($xmlfile10, 'w') or die("can't open"); echo "<br>Hit 1000<br>"; fwrite($fh10, $stringData); $stringData = ''; fclose($fh10); } } } //Write Last Page if (($count2 > 0) && ($count2 <= 100)) { $fh1 = fopen($xmlfile1, 'a') or die("can't open"); fwrite($fh1, $stringData); } if (($count2 > 100) && ($count2 <= 200)) { $fh2 = fopen($xmlfile2, 'w') or die("can't open"); fwrite($fh2, $stringData); fclose($fh2); } if (($count2 > 200) && ($count2 <= 300)) { $fh3 = fopen($xmlfile3, 'w') or die("can't open"); fwrite($fh3, $stringData); fclose($fh3); } if (($count2 > 300) && ($count2 <= 400)) { $fh4 = fopen($xmlfile4, 'w') or die("can't open"); fwrite($fh4, $stringData); fclose($fh4); } if (($count2 > 400) && ($count2 <= 500)) { $fh5 = fopen($xmlfile5, 'w') or die("can't open"); fwrite($fh5, $stringData); fclose($fh5); } if (($count2 > 500) && ($count2 <= 600)) { $fh6 = fopen($xmlfile6, 'w') or die("can't open"); fwrite($fh6, $stringData); fclose($fh6); } if (($count2 > 600) && ($count2 <= 700)) { $fh7 = fopen($xmlfile7, 'w') or die("can't open"); fwrite($fh7, $stringData); fclose($fh7); } if (($count2 > 700) && ($count2 <= 800)) { $fh8 = fopen($xmlfile8, 'w') or die("can't open"); fwrite($fh8, $stringData); fclose($fh8); } if (($count2 > 800) && ($count2 <= 900)) { $fh9 = fopen($xmlfile9, 'w') or die("can't open"); fwrite($fh9, $stringData); fclose($fh9); } if (($count2 > 900) && ($count2 <= 1000)) { $fh9 = fopen($xmlfile10, 'w') or die("can't open"); fwrite($fh10, $stringData); fclose($fh10); }} echo $count; if (fh1) { fclose($fh1); }?>