jeden tag neu
//$StorePath = DEADLINKSSTORE."\\".$KeyWordStoreDir; // win version
$StorePath = DEADLINKSSTORE."/".$KeyWordStoreDir; // linux version
# erstelle verzeichnis, wenn es nicht existiert
if (!is_dir ( $StorePath ) ) {
mkdir ($StorePath, 0777);
};
# erstelle absoluten pfad zur keyword store datei
$StorePathFile .= $StorePath . "/$KeywordDate.DEADLINKS.txt";
$fh = fopen("$StorePathFile","a+");
flock($fh, LOCK_EX);
fputs($fh,"$hashvalue\n");
fclose($fh);
return 1;
}; # function reportDeadLinks( $hashvalue ) {
#querys from user to be logged
function logQuerys( $SearchQuery, $catg ) {
$isvalid = is_good($SearchQuery); # security.inc.php
//echo "($isvalid) on query: '$query'
";
if ( $isvalid != 1 ) {
return 0;
};
$KeywordDate = date("j.n.Y");
$KeyWordStoreDir = date("n.Y");
# setze den storepath -> jeden tag neu
//$StorePath = LOGLINKSSTORE."\\".$KeyWordStoreDir; // win version
$StorePath = LOGLINKSSTORE."/".$KeyWordStoreDir; // linux version
# erstelle verzeichnis, wenn es nicht existiert
if (!is_dir ( $StorePath ) ) {
mkdir ($StorePath, 0777);
};
# erstelle absoluten pfad zur keyword store datei
$StorePathFile .= $StorePath . "/$KeywordDate.$catg.txt";
$neu = trim($SearchQuery);
$list = explode(" ", $neu);
if ( count($list) <= 0 ){
$list = explode("+", $neu);
};
$last = $list[count($list)-1];
if ( is_numeric($last) && strlen($last) >=3 ){
$neu = "";
for ( $ArrayCount=0; $ArrayCount<=count($list)-2; $ArrayCount++ ) {
$neu .= $list[$ArrayCount]. " ";
}; // for ( $ArrayCount=0; $ArrayCount<=count($list)-1; $ArrayCount++ ) {
//echo "LAST '$last' SAVING: '$neu'
";
}; // if ( is_numeric($last) ){
trim($neu);
$fh = fopen("$StorePathFile","a+");
flock($fh, LOCK_EX);
fputs($fh,"$neu\n");
fclose($fh);
// echo "File: $StorePathFile
";
// echo "string: $neu
";
// pornrage.com keyword to twitter.com poster: social.inc.php
$shorturl = makeShortUrl($SearchQuery);
postTwitter($shorturl,$SearchQuery);
return 1;
}; # function logQuerys( $SearchQuery, $catg ) {
?>