Prepending and Appending to your keyword lists - Gift to you PHP script

dacash

Registered Member
Joined
Jan 28, 2008
Messages
52
Reaction score
16
I made this in couple minutes and tough maybe some of you can use.
it's to be run from command line, but can be easly modified to run from your browser.

PHP:
<?php
/*
 * Made by: The Force a.k.a dacash
 *
 * Usage: preApp.php keyword.txt append.txt outfile.txt
 */

if($argc < 5){
    echo "Usage: preApp.php keyword.txt append.txt outfile.txt\n";
}else{
    $key = file($argv[1]);
    $app = file($argv[2]);
    $out = fopen($argv[3], "w");
    
    foreach($key as $keys){
        $keys = trim($keys);
        
        fwrite($out, $keys."\n");
        foreach($app as $todoApp){
            $todoApp = trim($todoApp);
            fwrite($out, $keys." ".$todoApp."\n");
            fwrite($out, $todoApp. " ".$keys."\n");
        }
    }
    fclose($out);
}
?>
 
Back
Top