1. ¡OFERTA! con cupón "DIRVPS": hosting por $0,01 y también VPS Linux y Windows por $0,01 el primer mes por Interserver ← publi
    Descartar aviso
Descartar aviso
Al usar este sitio web, aceptas que nosotros y nuestros socios podamos establecer cookies para fines tales como personalizar el contenido y la publicidad. Más información.

Buscador interno en web html que indexe todas las secciones

Tema en 'Programación y Diseño Web' iniciado por marios, 12 Ene 2005.

  1. marios

    marios Nuevo usuario

    Hola a todos

    Pues basicamente es eso lo que busco, tengo una web con varias secciones toda en html

    y estoy buscando algun script prefabricado que se encarge de indexar todo, he usado uno en cgi que va basante bien pero en este nuevo servidor que tengo no es compatible

    a ver si alguien sabe algo

    saludos
     
  2.  
  3. SpecTruM

    SpecTruM Nuevo usuario

    pues si tu host soporta php busca algun script en www.hotscripts.com creo k abra algo
     
  4. marios

    marios Nuevo usuario

    si bueno, mi servidor soporta php, pero un script php se pone bien en una web en html? y me va a indexar las paginas en html?

    si es asi... a ver si me podies recomendar alguien que haya usado alguno

    saludos
     
  5. photo-erik-shop

    photo-erik-shop Nuevo usuario

    Bueno si trabajas con el servidor de Paginas de Microsoft.. IIS .. checa si tienes instalado el Index Server... en la empresa lo usan .. nunca lo he puesto.. pero he visto que funciona..


    slds..
     
  6. marios

    marios Nuevo usuario

    hola.. bueno no te he entendido muy bien :S el servidor donde alojo mi web es linux pero no entiendo tu respuesta mucho photo-erik-shop
     
  7. kitsch

    kitsch Nuevo usuario

    Si tu servidor es Linux, quiero pensar que tienes soporto para PHP. Te el codigo del SPIDER, este indexa y adminsitra tus archivos:

    <!--c1--><div class='codetop'>CÓDIGO</div><div class='codemain'><!--ec1-->

    <?php

    require('../includes/config.inc.php');

    ini_set(user_agent, "$spiderhost");

    $spiderday = $spiderday * 86400;

    set_time_limit(0);

    $starttime = date("H:i m/d/y");

    echo "##### The Spider has started at $starttime, Do Not Close This Console #####nn";



    // Start the big loop

    do {



    &nbsp; &nbsp;// Open the database and start looking at URLs

    &nbsp; &nbsp;$sql = mysql_query("SELECT * FROM search WHERE flag='0' ORDER BY date");

    &nbsp; &nbsp;while($rslt = mysql_fetch_array($sql)){

    &nbsp; &nbsp; &nbsp; &nbsp;$url_id = $rslt["url_id"];

    &nbsp; &nbsp; &nbsp; &nbsp;$url = $rslt["url"];

    &nbsp; &nbsp; &nbsp; &nbsp;$crc = $rslt["checksum"];

    &nbsp; &nbsp; &nbsp; &nbsp;$date = $rslt["date"];



    &nbsp; &nbsp; &nbsp; &nbsp;if($url === $ourl){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>WARNING: Repeditive URL got through: $ourln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// Make an announcement

    &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>nNow Processing: $urln";



    &nbsp; &nbsp;// Don't go there if you don't have to

    &nbsp; &nbsp; &nbsp; &nbsp;if($flag == 1){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>This url is already up to date.";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// Open URL for parsing

    &nbsp; &nbsp; &nbsp; &nbsp;$read = @file_get_contents($url);

    &nbsp; &nbsp; &nbsp; &nbsp;echo $read;

    &nbsp; &nbsp; &nbsp; &nbsp;if(!$read || $read == ''){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Killing off dead URL: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM search WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp;// Check for binaries

    &nbsp; &nbsp; &nbsp; &nbsp;$ckbin = 14;

    &nbsp; &nbsp; &nbsp; &nbsp;while($ckbin <= 26){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ck = chr($ckbin);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$cbin = substr_count($read, $ck);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($cbin > 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Killing off binary file URL: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM search WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue 2;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;++$ckbin;

    &nbsp; &nbsp; &nbsp; &nbsp;}





    &nbsp; &nbsp;// Set date and checksum info

    &nbsp; &nbsp; &nbsp; &nbsp;$checksum = crc32($read);

    &nbsp; &nbsp; &nbsp; &nbsp;$daycheck = date(U) - $spiderday;



    &nbsp; &nbsp; &nbsp; &nbsp;$date = strtotime($date);

    &nbsp; &nbsp; &nbsp; &nbsp;if($date > $daycheck && $crc == $checksum){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>This url is already up to daten";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// Get rid of pages from idiot webmasters who's first line of code starts with "<script".

    &nbsp; &nbsp; &nbsp; &nbsp;$firstcheck = trim(strtolower(substr($read, 0, 8)));

    &nbsp; &nbsp; &nbsp; &nbsp;if($firstcheck == "<script" || $firstcheck == "< script"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Killing off incompatible file at: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM search WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue; &nbsp; &nbsp; &nbsp; &nbsp;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// Get meta tags

    &nbsp; &nbsp; &nbsp; &nbsp;$meta = @get_meta_tags($url);

    &nbsp; &nbsp; &nbsp; &nbsp;$robots = $meta["robots"];

    &nbsp; &nbsp; &nbsp; &nbsp;$keywords = $meta["keywords"];

    &nbsp; &nbsp; &nbsp; &nbsp;$keywords = str_replace("'","`",$keywords);

    &nbsp; &nbsp; &nbsp; &nbsp;$description = $meta["description"];

    &nbsp; &nbsp; &nbsp; &nbsp;$description = str_replace("'","`",$description);

    &nbsp; &nbsp; &nbsp; &nbsp;if(strlen($description) > 255){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$description = substr($description, 0, 255);

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// Check robots meta tags

    &nbsp; &nbsp; &nbsp; &nbsp;$metarobots = "noindex";

    &nbsp; &nbsp; &nbsp; &nbsp;if(checkmetarobots($metarobots)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Indexing disallowed by robots meta tag: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM search WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;$metarobots = "none";

    &nbsp; &nbsp; &nbsp; &nbsp;if(checkmetarobots($metarobots)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Indexing disallowed by robots meta tag: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM search WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// Get the page title

    &nbsp; &nbsp; &nbsp; &nbsp;$temp = spliti("title>",$read,3);

    &nbsp; &nbsp; &nbsp; &nbsp;$title = substr($temp[1],0,-2);

    &nbsp; &nbsp; &nbsp; &nbsp;$title = str_replace("'","`",$title);

    &nbsp; &nbsp; &nbsp; &nbsp;if(strlen($title) > 128){$title = substr($title, 0, 128);}

    &nbsp; &nbsp; &nbsp; &nbsp;if($title == ""){$title = "No Title";}



    &nbsp; &nbsp;// Run the cleanup function to parse all the garbage and whitespace out of the code

    &nbsp; &nbsp; &nbsp; &nbsp;if(!hardcleanup()){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Clean up error on $linkn";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// Encode stuff and put ir in the search databasen";

    &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Updating: $titlen$urln";

    &nbsp; &nbsp; &nbsp; &nbsp;$title = html_entity_decode($title);

    &nbsp; &nbsp; &nbsp; &nbsp;$description = html_entity_decode($description);

    &nbsp; &nbsp; &nbsp; &nbsp;$body = html_entity_decode($body);

    &nbsp; &nbsp; &nbsp; &nbsp;$renew = @mysql_unbuffered_query("UPDATE search SET url='$url', title='$title', metak='$keywords', metad='$description', checksum='$checksum', date=CURDATE(), flag=1, body='$body' WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp;if(!$renew || $renew == ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>NOT UPDATED: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM search WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue; &nbsp; &nbsp; &nbsp; &nbsp;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;else{

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$renew = @mysql_unbuffered_query("UPDATE search SET flag=1 WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(!$renew || $renew == ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>NOT UPDATED: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM search WHERE url_id='$url_id'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// Check robots meta tags

    &nbsp; &nbsp; &nbsp; &nbsp;$metarobots = "nofollow";

    &nbsp; &nbsp; &nbsp; &nbsp;if(checkmetarobots($metarobots)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Following disallowed by robots meta tag: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;$metarobots = "none";

    &nbsp; &nbsp; &nbsp; &nbsp;if(checkmetarobots($metarobots)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br>Following disallowed by robots meta tag: $urln";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;// "Parse the main URLn";

    &nbsp; &nbsp; &nbsp; &nbsp;$top = parse_url($url);

    &nbsp; &nbsp; &nbsp; &nbsp;$tschm = $top["scheme"];

    &nbsp; &nbsp; &nbsp; &nbsp;$thost = $top["host"];

    &nbsp; &nbsp; &nbsp; &nbsp;$tpath = $top["path"];

    &nbsp; &nbsp; &nbsp; &nbsp;$tqury = $top["query"];

    &nbsp; &nbsp; &nbsp; &nbsp;$tfrag = $top["fragment"];



    &nbsp; &nbsp; &nbsp; &nbsp;$currentdomain = $tschm . "://" . $thost;

    &nbsp; &nbsp; &nbsp; &nbsp;$getbot = $currentdomain . "/robots.txt";

    &nbsp; &nbsp; &nbsp; &nbsp;$robotay = @file($getbot);



    &nbsp; &nbsp;// Parse all the links on the page

    &nbsp; &nbsp; &nbsp; &nbsp;$rtemp = stristr($read,"<"); &nbsp; &nbsp;

    &nbsp; &nbsp; &nbsp; &nbsp;$temp = stristr($rtemp,"a");

    &nbsp; &nbsp; &nbsp; &nbsp;while($rtemp){

    &nbsp; &nbsp; &nbsp; &nbsp;//"Parse the href out of the stringn";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$rtemp = stristr($temp,"href");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$rtemp = stristr($rtemp, '"');

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$rtemp = substr($rtemp, 1);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$lpos = strpos($rtemp, '"');

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = substr($rtemp, 0, $lpos);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$temp = stristr($rtemp,"<");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = trim($link);



    &nbsp; &nbsp; &nbsp; &nbsp;// Kill any trailing slashes

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(substr($link,(strlen($link)-1)) == "/"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = substr($link,0,(strlen($link)-1));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// If it just won't fit.

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(strlen($link) > 255){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(checkforgarbage()){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Parse the current link

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bot = @parse_url($link);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(!$bot || $bot == ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bschm = $bot["scheme"];

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bhost = trim(urldecode($bot["host"]));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bpath = trim(urldecode($bot["path"]));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bqury = $bot["query"];

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bfrag = $bot["fragment"];



    &nbsp; &nbsp; &nbsp; &nbsp;// Get rid of outside links

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($bhost != "" && $bhost != $thost){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Kill off any fragment based URLs

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(strlen($bfrag) > 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Kill off any dot dots ../../ and dots ././

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ddotcheck = substr_count($bpath,"../");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($ddotcheck != ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bpath = str_replace("/../", "/", $bpath);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bpath = str_replace("../", "/", $bpath);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$dotcheck = substr_count($bpath, "./");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($dotcheck != ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bpath = str_replace("/./", "/", $bpath);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bpath = str_replace("./", "/", $bpath);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Comparitive analisys

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($bpath != "" && substr($bpath,0,1) != "/"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(strrpos($tpath,".") === false){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bpath = $tpath . "/" . $bpath;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(strrpos($tpath,".")){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ttmp = substr($tpath,0,(strrpos($tpath,"/")+1));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bpath = $ttmp . $bpath;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(substr($bpath,0,1) != "/"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bpath = "/" . $bpath;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Kill any trailing slashes

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = trim($link);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(substr($link,(strlen($link)-1)) == "/"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = substr($link,0,(strlen($link)-1));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Check to see if the scheme and domain are in the url

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($bhost == ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = $thost . $bpath;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = str_replace(" ", "", $link);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = str_replace("//", "/", $link);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = $tschm . "://" . $link;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = urldecode($link);



    &nbsp; &nbsp; &nbsp; &nbsp;// Kill off any remaining query strings

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kilqu = strpos($link, "?");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($kilqu > 0 || $kilqu != ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = substr($link, 0, $kilqu);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = trim(str_replace("?", "", $link));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Format the link for inclusion and to avoid stupid looping

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = trim(strtolower($link));



    &nbsp; &nbsp; &nbsp; &nbsp;// Kill any trailing slashes

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(substr($link,(strlen($link)-1)) == "/"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = substr($link,0,(strlen($link)-1));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Don't be overly recursive

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($link == $currentdomain){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// If it's a usless link, kill it

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($link == ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Execute robots exclusion standard via robots.txt

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(checkrobotstxt()){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "nDisallowed by robots.txt: $linknn";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Finish it off and prep for the next loop

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(!checkandupdatetoindexer()){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;continue;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;// Take the new URLs and put them in the search database, or finish if there are no more

    &nbsp; &nbsp; &nbsp; &nbsp;$movem = mysql_query("SELECT url FROM indexer");

    &nbsp; &nbsp; &nbsp; &nbsp;while($mvrslt = mysql_fetch_array($movem)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$murl = $mvrslt["url"];

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$putem = mysql_unbuffered_query("INSERT INTO search SET url='$murl'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM indexer");

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;$ourl = $url;

    &nbsp; &nbsp;}

    &nbsp; &nbsp;$preloop = mysql_fetch_row(mysql_unbuffered_query("SELECT COUNT(checksum) AS count FROM search WHERE checksum='0'"));

    &nbsp; &nbsp;$loopcount = $preloop[0];

    } while($loopcount > 0);



    $done = mysql_unbuffered_query("UPDATE search SET flag='0' WHERE flag='1'");



    echo "nnOptimizing Database...";

    $cleans = mysql_query("OPTIMIZE TABLE search");

    $cleani = mysql_query("OPTIMIZE TABLE indexer");

    echo " Done.nn";



    $endtime = date("H:i m/d/y");

    echo "nn##### Spider started at $starttime, finished at $endtime. #####n##### You Can Now Close This Console #####n";

    ////// &nbsp;Spider Functions &nbsp; //////



    function checkandupdatetoindexer(){

    &nbsp; &nbsp;global $link;

    &nbsp; &nbsp;// "Put the new URL in the search databasen";

    &nbsp; &nbsp; &nbsp; &nbsp;$link = trim($link);

    &nbsp; &nbsp; &nbsp; &nbsp;if(substr($link,(strlen($link)-1)) == "/"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$link = substr($link,0,(strlen($link)-1));

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;$chk = @mysql_unbuffered_query("SELECT * FROM search");

    &nbsp; &nbsp; &nbsp; &nbsp;while($curec = mysql_fetch_array($chk)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$curid = $curec["url_id"];

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$curchk = urldecode($curec["url"]);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(trim($curchk) == trim($link)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return FALSE;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;$chk = @mysql_unbuffered_query("SELECT * FROM indexer");

    &nbsp; &nbsp; &nbsp; &nbsp;while($curec = mysql_fetch_array($chk)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$curid = $curec["url_id"];

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$curchk = $curec["url"];

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(trim($curchk) == trim($link)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return FALSE;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;$chk = @mysql_unbuffered_query("SELECT * FROM directory");

    &nbsp; &nbsp; &nbsp; &nbsp;while($curec = mysql_fetch_array($chk)){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$curid = $curec["link_id"];

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$curchk = $curec["link"];

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$tlink = strlen($curchk);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$glink = substr($link, 0, $tlink);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($glink == $curchk){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo "<br><b>Adding: $link n</b>";

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$putup = mysql_unbuffered_query("INSERT INTO indexer SET url='$link'");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp;return FALSE;

    }



    function checkforgarbage(){

    &nbsp; &nbsp; &nbsp; &nbsp;global $link;

    &nbsp; &nbsp; &nbsp; &nbsp;// "Get rid of any garbage and most binary files in the linkn";

    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),"&?") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),"@") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),"javascript") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),"mailto") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".jpg") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;

    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".gif") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".pdf") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".pnf") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".png") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".mpg") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".mov") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".mpeg") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".avi") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".mp3") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".wav") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;

    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".zip") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".tar") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".gz") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".tgz") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".exe") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".css") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".rm") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".bin") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".iso") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".xls") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".doc") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".dbf") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".iso") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".dll") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".sys") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".au") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}



    &nbsp; &nbsp; &nbsp; &nbsp;if(substr_count(strtolower($link),".c") != 0){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;return FALSE;

    }



    function checkmetarobots(){

    &nbsp; &nbsp;global $robots, $metarobots;

    &nbsp; &nbsp;if(substr_count($robots,$metarobots) > 0){

    &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp;}

    &nbsp; &nbsp;return FALSE;

    }



    function checkrobotstxt(){

    &nbsp; &nbsp;global $currentdomain, $link, $robotay, $spiderhost;



    &nbsp; &nbsp;if(!$robotay || $robotay == ""){

    &nbsp; &nbsp; &nbsp; &nbsp;return FALSE;

    &nbsp; &nbsp;}



    &nbsp; &nbsp;$robotaycount = count($robotay);

    &nbsp; &nbsp;$roop = 0;

    &nbsp; &nbsp;while($roop <= $robotaycount){

    &nbsp; &nbsp; &nbsp; &nbsp;$curele = $robotay[$roop];

    &nbsp; &nbsp; &nbsp; &nbsp;if(!$curele || $curele == ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Return FALSE;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;$thecolon = strpos($curele,":");

    &nbsp; &nbsp; &nbsp; &nbsp;if(substr($curele,0,($thecolon+1)) == "User-agent:"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$robgent = trim(substr($curele,$thecolon+1));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($robgent == "*" || $robgent == $spiderhost){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$dospider = 1;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else{

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return FALSE;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;if(substr($curele,0,($thecolon+1)) == "Disallow:"){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$st = strpos($curele, "/");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$robdis = substr($curele, $st);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$ed = strrpos(trim($robdis), "/");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$robdis = trim(substr($robdis, 0));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(!$robdis || $robdis == ""){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return FALSE;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$fnd = substr_count($link, $robdis);

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if($fnd){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return TRUE;

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp; &nbsp; &nbsp;++$roop;

    &nbsp; &nbsp;}

    &nbsp; &nbsp;return FALSE;

    }



    function hardcleanup(){

    &nbsp; &nbsp;global $body, $read, $title, $url;

    // Set the script and style tags to lowercase so these routines can work

    &nbsp; &nbsp;$tolower = "SCRIPT>";

    &nbsp; &nbsp;while(substr_count($read, $tolower)){

    &nbsp; &nbsp; &nbsp; &nbsp;$islower = strtolower($tolower);

    &nbsp; &nbsp; &nbsp; &nbsp;$read = str_replace($tolower, $islower, $read);

    &nbsp; &nbsp; &nbsp; &nbsp;$tolower = "Script>";

    &nbsp; &nbsp;}

    &nbsp; &nbsp;$tolower = "STYLE>";

    &nbsp; &nbsp;while(substr_count($read, $tolower)){

    &nbsp; &nbsp; &nbsp; &nbsp;$islower = strtolower($tolower);

    &nbsp; &nbsp; &nbsp; &nbsp;$read = str_replace($tolower, $islower, $read);

    &nbsp; &nbsp; &nbsp; &nbsp;$tolower = "Style>";

    &nbsp; &nbsp;}



    // Kill any style tags

    &nbsp; &nbsp;$kstyle = substr_count($read, "/style>");

    &nbsp; &nbsp;if($kstyle > 0){

    &nbsp; &nbsp; &nbsp; &nbsp;$a = 1;

    &nbsp; &nbsp; &nbsp; &nbsp;while($a <= $kstyle){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bstyl = strpos($read, "/style>");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$read = substr($read, ($bstyl+7));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;++$a;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp;}



    // Kill any scripts

    &nbsp; &nbsp;$kscript = substr_count($read, "/script>");

    &nbsp; &nbsp;if($kscript > 0){

    &nbsp; &nbsp; &nbsp; &nbsp;$a = 1;

    &nbsp; &nbsp; &nbsp; &nbsp;while($a <= $kscript){

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$bscrpt = strpos($read, "/script>");

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$read= substr($read, ($bscrpt+8));

    &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;++$a;

    &nbsp; &nbsp; &nbsp; &nbsp;}

    &nbsp; &nbsp;}



    // Get the page body

    &nbsp; &nbsp;$body = trim(strip_tags($read));

    &nbsp; &nbsp;$body = str_replace("'","`",$body);



    // Make sure there's something left to work with

    &nbsp; &nbsp;if(trim($body) == ""){

    &nbsp; &nbsp; &nbsp; &nbsp;echo "Killing off empty file.";

    &nbsp; &nbsp; &nbsp; &nbsp;$kill = mysql_unbuffered_query("DELETE FROM search WHERE url='$url'");

    &nbsp; &nbsp; &nbsp; &nbsp;return FALSE;

    &nbsp; &nbsp;}



    return TRUE;

    }

    ?>

    <!--c2--></div><!--ec2-->

    Esta bastante largo es algo complejo de editar, si dominas PHP no tendras problema, si no, mejor ahi que buscar una alternativa. :wink:
     
  8. photo-erik-shop

    photo-erik-shop Nuevo usuario

    :shock: Estupendo kitsch.... magnifico..!!!!! que gran Aporte..

    sld.s.
     
  9. marios

    marios Nuevo usuario

    <!--QuoteBegin-kitsch+--><div class='quotetop'>CITA(kitsch)</div><div class='quotemain'><!--QuoteEBegin-->Si tu servidor es Linux, quiero pensar que tienes soporto para PHP. Te el codigo del SPIDER, este indexa y adminsitra tus archivos:


    Esta bastante largo es algo complejo de editar, si dominas PHP no tendras problema, si no, mejor ahi que buscar una alternativa. :wink:<!--QuoteEnd--></div><!--QuoteEEnd-->

    ok he mirado el codigo pero bueno no soy muy experto que digamos al php, o sea se instalar prefabricados pero n otengo mucho nivel.

    una cosa veo en el script esto:

    require('../includes/config.inc.php'

    mm me suena que el codigo es de un cms o algo?

    si me ayudaras a hacer funcionar ese script te estaría agradecido
    ah recuerda que mi web esta en html

    saludos
     


Alojamiento web, Hosting Reseller, Servidores Dedicados - All in Hosting


    
    
    
    
Blog · Sitios amigos: GuiaHosting · Unidominios · Interalta ·