Topic: [HACK] record search entries...
Name: Record search entries.
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
simple thing i think is great enough to be put into the hack section and make me famous....
In older versions people could get hacked through search.php. Since 1.4.6 this should be fixed. Though you can also use this to get some insight about popular topics on your site. So you can provide some more info about that on your site.
$ip = getenv('REMOTE_ADDR'); // get ip $fp = fopen("search.txt", "a"); // open search.txt fputs($fp, "$story - $ip\n"); // prints the search term and the ip to search.txt fclose($fp); // closes the file
add this to line 255 of search.php
it stores every search term (only the simple search, easy to modify to recored the advanced search as well if you wanted to), and the ip of who did it
make sure you make search.txt and chmod it to 777 (666 would also work i think...), then open up search.txt to see it set out like:
search words - 127.0.0.0
happy people - 22.214.171.124
shoes - 126.96.36.199
you could rename all search.txt's to some random letters so that people cannot access it unless they know the file name (something like aunqio73.txt)