Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Re: [editor2] rate.cgi

Quote Reply
Re: [editor2] rate.cgi In reply to
Maybe you can make rate.cgi use the same security as add.cgi, that is, mod it to use db_refferer? You would need to change the error message to "The rate feature cannot be accessed directly. Please visit the site and click on 'rate'." or something like that... Try adding this:

# Check the referer.
if (@db_referers and $ENV{'HTTP_REFERER'}) {
$found = 0;
foreach (@db_referers) {
$ENV{'HTTP_REFERER'} =~ /$_/i and $found++ and last;
}
if (!$found) {
&site_html_add_failure ("Auto submission is not allowed in this directory. Please visit the site to add your entry.");
return;
}
}


under this in rate.cgi:

sub main {
# --------------------------------------------------------
local (%in) = &parse_form;


Let us know if it works...
PS-- FYI, everytime a browser has to go to the server for something, it counts as a hit, so if a page has the html code, and five pictures (gif, jpeg...) then one visit to that page counts as six 'hits'.


Leonard
aka PerlFlunkie

Last edited by:

PerlFlunkie: Apr 2, 2003, 10:29 AM
Subject Author Views Date
Thread Re: rate.cgi editor2 3259 Apr 1, 2003, 2:09 AM
Thread Re: [editor2] rate.cgi
Andy 3211 Apr 1, 2003, 5:03 AM
Thread Re: [Andy] rate.cgi
editor2 3180 Apr 1, 2003, 1:29 PM
Thread Re: [editor2] rate.cgi
PerlFlunkie 3149 Apr 1, 2003, 11:52 PM
Thread Re: [PerlFlunkie] rate.cgi
editor2 3151 Apr 1, 2003, 11:57 PM
Post Re: [editor2] rate.cgi
PerlFlunkie 3144 Apr 2, 2003, 10:24 AM