get_results('SELECT ID FROM '.$table_prefix.'posts WHERE post_status="publish"'); foreach($rows as$row){ #echo'https://'.LIVE_DOMAIN.'/'.$row->post_name.'
'."\n"; $lnk = get_permalink($row->ID); $lnk = explode(LIVE_DOMAIN,$lnk)[1]; $lnk = strtolower($lnk); $lnk = str_replace('-','',$lnk); $lnk = str_replace('_','',$lnk); if(strpos($lnk,'/?')===0 or strpos($lnk,'%')!==false or preg_match('/\/[0-9]+\//',$lnk)===1){ # https://stackoverflow.com/questions/4051889/regular-expression-any-text-to-url-friendly-one continue; } if(preg_match('/[^a-z0-9]/i',$lnk)===1){ echo'https://'.LIVE_DOMAIN.$lnk.'
'."\n"; } }