Tutorials Infos - Anleitungen - Hilfe - Dreamcodes
 

Url zu Google

Ein Script zum automatischem Eintragen ihrer Internetseite incl. aller Unterverzeichnisse und enthaltene Dateien bei Google

Script:
<?PHP
function doit($fs, $path, $hostname)
{
    
$dir = dir($path);
    while (
$item = $dir->read())
    {        
        if(
$item!="."&&$item!="..")
        {
            if(
is_dir($path."/".$item))
            {
                
doit($fs, $path."/".$item, $hostname);
            }
            
$url = $path."/".$item;
            
$url = str_replace("./", "/", $url);
            
$url = "http://".$hostname.$url;
            
$current = fopen("http://www.google.de/addurl?q=$url&dq=", "r");
            if(
$current)
            {
                
$culog="";
                while (!
feof($current))
                {
                    
$culog .= fread($current, 1024);
                }
                
fclose($current);
            }
            
fwrite($fs, time().$url.":\n");
            
fwrite($fs, $culog."\n");
            echo
$url."<br>";
        }
    }
}

$fs = fopen("ag.log", "w");
if(
$fs)
{
    
$hostname = $HTTP_SERVER_VARS['SERVER_NAME'];
    
doit($fs, ".", $hostname);
}
fclose($fs);

?>

 
ID: 380
eingestellt am: 25.03.2004
Autor: Matthias Funken
Status zum lesen: Gast
gelesen: 8689
Webseite: www.dreamcodes.com
[Drucken]