PGI Super Key Cleaner Pro
Cleaning lists...\n"; $inopt = "Input Options:"; foreach ($options['input'] as $k=>$v) { $inopt .= " [$k] $v"; } $logdev->log($inopt); $cleanopt = "Clean Options:"; foreach ($options['clean'] as $k=>$v) { $cleanopt .= " [$k] $v"; } $logdev->log($cleanopt); $outopt = "Output Options:"; foreach ($options['output'] as $k=>$v) { $outopt .= " [$k] $v"; } $logdev->log($outopt); $badwords = array_map('trim', file("$basedir/badwords.txt")); $options['output']['batchno'] = date('YmdHis', time()); switch ($options['input']['mode']) { case 'file': $kwlist = array_map('trim', file($options['input']['source'])); clean($kwlist, $options, $options['input']['source']); break; case 'list': $kwlist = array_map('trim', $options['input']['keylist']); clean($kwlist, $options, $options['input']['source']); break; case 'batch': // $inlist = as set at start if (isset($options['input']['first'])) { $inlist = array_slice($inlist, 0, $options['input']['first']); } if (isset($options['input']['random'])) { shuffle($inlist); $inlist = array_slice($inlist, 0, $options['input']['random']); } if (isset($options['input']['folder'])) { $s = "/".$options['input']['folder']."/"; foreach($inlist as $f) { if (strpos($f, $s) !== false) { $newlist[] = $f; } } $inlist = $newlist; } foreach ($inlist as $in) { $kwlist = array_map('trim', file($in)); clean($kwlist, $options, $in); } break; } if (!empty($options['output']['zip']) && $inputdir=='sorted') { // scan cleaned dir for domain sub-folders $cleanbatchdir = $basedir . '/cleaned/' . $options['input']['batchno']; $cleandir = new fbCount(); $cleandir->set_recurse(true); $cleandir->scan($cleanbatchdir); foreach($cleandir->dirtree as $dir) { if (chdir($cleanbatchdir . '/' . $dir)) { // get file list to zip $tozip = glob('*.txt'); // zip files switch ($options['output']['zip']) { case 'D': $zipname = $dir.'##D.zip'; break; case 'F': $zipname = $dir.'##F.zip'; break; } $zipopt = array('no_compression' => false, 'add_path' => "", 'remove_path' => "", 'remove_all_path' => true); $zip = new Archive_Zip($zipname); $res = $zip->create($tozip, $zipopt); if (is_array($res)) { // remove txt files leaving just zip file in dir foreach ($tozip as $f) { unlink($f); } } else { $logdev->log("Zip: Error creating Zip file $cleanbatchdir/$dir/$zipname [" .$zip->errorInfo(true). "]"); } } else { $logdev->log("chdir: Unable to access directory $cleanbatchdir/$dir"); } } } echo "Done.
\n"; $logdev->close(); echo "\n"; } else { // show form ?>
The all new PGI Super Key Cleaner Pro is greatly improved compared to the previous version, and features many more options for cleaning your keyword lists. In addition, Super Key Cleaner Pro has a number of unique features specifically for PGI users to assist with keyword list preparation in conjunction with the PGI portal builder scripts. We're sure you'll find these both useful and time saving.
\n"; echo "Input Errors
\n"; echo "- \n";
foreach ($inputerr as $val)
{
echo "
- " .$val. " \n"; } echo "