isFile()) { // if current file is not index then printing it if($file->getFilename() !== 'index.html' && str_ends_with($file->getFilename(),'.html') && $file->getFilename() !== 'post.html') print "\n".$protocol."://".$host."/".str_replace('.html','/',$file->getFilename()); } } foreach (new DirectoryIterator($root."/posts/") as $file) { if ($file->isFile()) { // if current file is not index then printing it if($file->getFilename() !== 'index.html' && $file->getFilename() !== 'index.xml') print "\n".$protocol."://".$host."/".str_replace('.xml','/',$file->getFilename()); } } require_once($_SERVER['DOCUMENT_ROOT']."/php/map.php"); $map = new map(5000); $i=0; foreach($map -> map as $state => $cities){ if($i == 0){ $i++; continue; } $parts = explode("|",$state); $state_name = str_replace(" ","-",strtolower($parts[0])); print "\nhttps://www.greentrustcashs.com/".$state_name."/"; foreach($cities as $city){ print "\nhttps://www.greentrustcashs.com/".$state_name."/".str_replace(" ","-",strtolower($city))."/"; } } ?>