[ Index ]
 

Code source de Cr@wltr@ck 2.2.1

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/php/ -> refresh.php (source)

   1  <?php
   2  //----------------------------------------------------------------------

   3  //  CrawlTrack 2.2.1

   4  //----------------------------------------------------------------------

   5  // Crawler Tracker for website

   6  //----------------------------------------------------------------------

   7  // Author: Jean-Denis Brun

   8  //----------------------------------------------------------------------

   9  // Website: www.crawltrack.fr

  10  //----------------------------------------------------------------------

  11  // That script is distributed under GNU GPL license

  12  //----------------------------------------------------------------------

  13  // file: refresh.php

  14  //----------------------------------------------------------------------

  15  error_reporting(0);
  16  //access control

  17  // session start 'crawlt'

  18  session_name('crawlt');
  19  session_start();
  20  
  21  if( !isset($_SESSION['rightsite']))
  22  {
  23      echo"<h1>Hacking attempt !!!!</h1>";
  24      exit();
  25  }
  26  
  27  //get url data

  28  
  29  if(isset($_GET['navig']))
  30      {
  31      $navig = (int)$_GET['navig'];
  32      }
  33  else
  34      {    
  35      echo"<h1>Hacking attempt !!!!</h1>";
  36      exit();
  37      }
  38  if(isset($_GET['period']))
  39      {
  40      $period = (int)$_GET['period'];
  41      }
  42  else
  43      {    
  44      echo"<h1>Hacking attempt !!!!</h1>";
  45      exit();
  46      }
  47  if(isset($_GET['site']))
  48      {
  49      $site= (int)$_GET['site'];
  50      }
  51  else
  52      {    
  53      echo"<h1>Hacking attempt !!!!</h1>";
  54      exit();
  55      }
  56  if(isset($_GET['crawler']))
  57      {
  58      $crawler= $_GET['crawler'];
  59      }
  60  else
  61      {    
  62      echo"<h1>Hacking attempt !!!!</h1>";
  63      exit();
  64      }
  65  if(isset($_GET['graphpos']))
  66      {
  67      $graphpos= $_GET['graphpos'];
  68      }
  69  else
  70      {    
  71      echo"<h1>Hacking attempt !!!!</h1>";
  72      exit();
  73      }
  74  
  75  
  76  // include

  77  include "../include/configconnect.php";
  78  
  79  //database connection

  80  $connexion = mysql_connect($crawlthost,$crawltuser,$crawltpassword) or die("MySQL connection to database problem");
  81  $selection = mysql_select_db($crawltdb) or die("MySQL database selection problem");
  82  
  83  //clear cache table

  84  $sqlcache = "TRUNCATE TABLE crawlt_cache";
  85  $requetecache = mysql_query($sqlcache, $connexion) or die("MySQL query error");
  86  
  87  //clear graph table

  88  $sqlgraph = "TRUNCATE TABLE crawlt_graph";
  89  $requetegraph = mysql_query($sqlgraph, $connexion) or die("MySQL query error");
  90  
  91  
  92  //mysql connexion close

  93  mysql_close($connexion);
  94      
  95  //clear the cache folder

  96  $dir = dir('../cache/');
  97  while (false !== $entry = $dir->read())
  98      {
  99      // Skip pointers

 100      if ($entry == '.' || $entry == '..')
 101          {
 102          continue;
 103          }
 104       unlink("../cache/$entry");
 105      }
 106  
 107  // Clean up

 108  $dir->close();
 109  
 110  //call back the page

 111  $crawlencode = urlencode($crawler);
 112  $urlrefresh ="../index.php?navig=$navig&period=$period&site=$site&crawler=$crawlencode&graphpos=$graphpos";
 113  header("Location:$urlrefresh");
 114  
 115  
 116  ?>


Généré le : Thu Sep 6 14:14:11 2007 par Balluche grâce à PHPXref 0.7