Gossamer Forum
Home : Products : Links 2.0 : Customization :

Glennu Mod

Quote Reply
Glennu Mod
I have just installed Glennu's mod that stores IP's so if someone at the same IP tries to resubmit, it blocks them!

I have added the sub site_html_ip_error to site_html.pl, but now when I try to resubmit a duplicate URL, add.cgi tries to make me download site_html_ip_error in text format. Why is this?

Site_html and add.cgi are both chmodded to 755

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: Glennu Mod In reply to
there's probably an error in the code, a mistype or what.

did you read what the download said? If not I'd suggest to let the browser doanload your submission, open the file in your favorite text editor, hopefully it will read the contents, and see what the error code tells you.

if you still have troubles why not post the error codes again in this thread and I'm sure somebody will come along and help.

good luck

PS glenn's pretty good with responding to problems with his scripts, that's if he's not too busy studying Smile

Quote Reply
Re: Glennu Mod In reply to
If you read my first post properly you would have seen what I meant!

What I said was that my browser forces me to download the sub site_html_ip_error and I can't open it through my browser as one does with an ordinary page!

I saved the download and opened it, and it just shows the contents of the HTML error page, but in a text file.

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: Glennu Mod In reply to
In Reply To:
HTML error page
And the error is.....??

BTW: The .pl file should be 644 NOT 755...

Regards,

Eliot Lee

Quote Reply
Re: Glennu Mod In reply to
As I have said TWICE now, there is NO ERROR. It just makes me download the html page that is supposed to show up in the browser.

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: Glennu Mod In reply to
Dude..chill........there trying to help you! Have you tried changing the permissions on the file?

Quote Reply
Re: Glennu Mod In reply to
Yes I have changed permissions and I know that they are trying to help, but they aren't listening to what I am saying.

I am not getting an error, I am being forced to download an error template that should show as a html page in my browser. The error template is to be showed to people who submit two links with the same IP address, so when I tested it out, I just keep being asked to download the page rather than it opening in my browser.

I chmodded site_html.pl to 644 but it still does the same!


From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: Glennu Mod In reply to
Why is the .pl file supposed to be 644?

Aren't all .cgi and .pl files supposed to be executable (chmod 755)?

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: Glennu Mod In reply to
In Reply To:
I just keep being asked to download the page rather than it opening in my browser
Well...download the file and OPEN it in your TEXT EDITOR...you should see an error message in the file that you download...

Again..and the error message is?

Regards,

Eliot Lee

Quote Reply
Re: Glennu Mod In reply to
No once again you have misunderstood!

There is NO error message!
I am just asked to download the html page.

When someone submits a duplicate URL from the same IP, an error page is supposed to show up saying "Sorry, no duplicates", or something like that.

So when I tested it out, add.cgi asks me if I want to download the file - and this is what is in it.

This is what I am asked to download....


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>

<head>
<title>Audio-Grabber: Spamming</title>
</HEAD>
<body bgcolor="#ffffff">
<img src="/img/title.gif"> <img src="/img/title2.gif">
<table width="100%" bgcolor="#999999"><tr><TD>
<center>
<a href="http://www.audio-grabber.com"><font face="arial" size="2" style="text-decoration:none">Home</a> |

<a href="/cgi-bin/add.cgi"><font face="arial" size="2" style="text-decoration:none">Add URL</a> |

<a href="/Cool/"><font face="arial" size="2" style="text-decoration:none">What's Cool?</a> |

<a href="/New"><font face="arial" size="2" style="text-decoration:none">Brand New</a> |

<a href="/Ratings"><font face="arial" size="2" style="text-decoration:none">Top Choice</a> |

<a href="/cgi-bin/subscribe.cgi"><font face="arial" size="2" style="text-decoration:none">Updates</a> |

<a href="/advertise.html"><font face="arial" size="2" style="text-decoration:none">Advertise</a> |

<a href="/cgi-bin/forum/wwwthreads.pl"><font face="arial" size="2" style="text-decoration:none">Music Forum</a> |

<a href="/cgi-bin/search.cgi"><font face="arial" size="2" style="text-decoration:none">Advanced Search</a> |

<a href="http://audio-grabber.mail.everyone.net/email/scripts/useragreement.pl"><font face="arial" size="2" style="text-decoration:none">FREE E-mail</a>
</center>
</TD></tr></table>



<div class="margin">
<center><table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr><td width="25%" align="middle" valign="top">Popular Search:

<a href="http://www.audio-grabber.com/cgi-bin/search.cgi?query=britney">Britney Spears</a></td>
<form action="http://www.audio-grabber.com/cgi-bin/search.cgi" method="GET">
<input type="hidden" name="humlang" value="1">
<td align="middle" width="50%"><input type="text" size=35 name="query"><input type=submit value="Search!">

<font size="2"><a href="http://www.audio-grabber.com/cgi-bin/search.cgi"><font color="#ff3333">Advanced Options</font></a></form></td>
<td width="25%" align="middle" valign="top">Popular Search:

<a href="http://www.audio-grabber.com/cgi-bin/search.cgi?query=skins">Winamp Skins</a></td></tr>
</table>
</div>
</center>

<table width="100%" bgcolor="#efefef"><TR><TD><font color="#000000">Spamming ERROR:</font></TD></TR></TABLE>
<p>
<p><font color="#ff3333"><B>ERROR:</b></font>Unfortunately we could not add your resource to the directory because someone with your IP has already submitted a site!<BR><BR>
Please do not try to spam the index as your IP address will be permanently blocked.<BR>

<form action="http://www.audio-grabber.com/cgi-bin/search.cgi" method="GET">
<input type="hidden" name="humlang" value="1">

<div class="margin">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><hr color="#efefef" NOSHADE><strong class="search">Search again!</strong></td></tr>
<tr><td><input type="text" size=15 name="query"> <input type=submit value="Search!"></td></tr>
<tr><td><small class="more"><a href="http://www.audio-grabber.com/cgi-bin/search.cgi">Advanced Options</a></small><hr color="#efefef" NOSHADE></td></tr>
</table>
</div>
</form>


<p><center><small class="update">Pages Updated On: 15-Sep-2000 - 19:32:55 - <img src="/cgi-sys/Count.cgi?df=audio-grabber.com-index.html&dd=E&ft=0">


&COPY; Copyright 2000 Audio-Grabber.com. All Rights Reserved. <a href="http://www.audio-grabber.com/copyright.html">Copyright Policy</a>.

Directory By: Gossamer Threads, Inc</a></small></center>

</p>


</body>
</html>



From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: Glennu Mod In reply to
Not sure what the problem could be. I had it on my site a while back and it worked fine.

I saw your other posts about spammers. Could be worth using a mod which checks the url isn't already in links.db before excepting them. You could also alter it so it checks validate.db as well. I think the mod which would do this is the duplicate url mod?

Good Luck!

Glenn


http://mir.spaceports.com/~glennu/
Quote Reply
Re: Glennu Mod In reply to
Thanks Glennu, coincidentally I installed this mod too afew days ago (duplicate url), and it works well, it is just your mod that seems to be having problems!

It works as it is supposed to, by giving the error if two URL's are submitted from the same IP, it just shows the HTML page in a text file rather than a html page that opens in the browser!

I don't know why, because all other pages work fine!

From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: Glennu Mod In reply to
The following code is set up to ignore:

http://www.mypage.com
http://www.mypage.com/
http://www.mypage.com/index.html
http://www.mypage.com/index.htm etc....

How would I alter the code to only accept one URL per domain.
So if someone has already submitted...
http://www.mypage.com
...then anything else from that domain would'nt be allowed



if ($rec{'add_record'}) { # don't need to worry about duplicate if modifying (unless, however, URL is changed!)
$testURL = $in{'URL'};
$testURL =~ tr/A-Z/a-z/;
$testURL =~ s/www\.//; # disregards www.
$testURL =~ s/\///g; # ignores slashes
$testURL =~ s/index\.html|index\.htm//; # disregards index.htm(l)
open (DB, "<$db_file_name") or &cgierr("error in validate_records. unable to open db file: $db_file_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB>) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
chomp;
@data = &split_decode($_);
$dataURL = $data[$db_url];
$dataURL =~ tr/A-Z/a-z/;
$dataURL =~ s/www\.//; # disregards www.
$dataURL =~ s/\///g; # ignores slashes
$dataURL =~ s/index\.html|index\.htm//; # disregards index.htm(l)
if ($dataURL eq "$testURL") {push(@input_err, "duplicate URL error - already listed!");} # so let's add it as an error
}
close DB;
open (DB, "<$db_valid_name") or &cgierr("error in validate_records. unable to open db file: $db_valid_name.\nReason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB>) {
(/^#/) and next LINE;
(/^\s*$/) and next LINE;
chomp;
@data = &split_decode($_);
$dataURL = $data[$db_url];
$dataURL =~ tr/A-Z/a-z/;
$dataURL =~ s/www\.//; # disregards www.
$dataURL =~ s/\///g; # ignores slashes
$dataURL =~ s/index\.html|index\.htm//; # disregards index.htm(l)
if ($dataURL eq "$testURL") {push(@input_err, "duplicate URL error - already submitted!");} # so let's add it as an error
}
close DB;
}



From Paul Wilson.
http://www.audio-grabber.com
Music Directory
Quote Reply
Re: Glennu Mod In reply to
Question, Have finally got the script working, now need to know if it can do this... I want to have a link

The world's best site
http://www.theworldsbestsite.com

then...

Rate it | Review It | ect...

And then have the review posted by who ever reviewed it...

A really great site, topping on the world's best but not quite number one. Signed the world's best critic.

But I want to have the latest review posted beneath the link on the Links page with a link to the remaining reviews should there be any. If there are not any more reviews, would have it set up so the link would not be there??? Any suggestions??? Thought of trying to use the rating part of the script....?

Trust in your elders, for they hold the key to life...
Quote Reply
Re: Glennu Mod In reply to
Well if your talking about comments 2 your in the wrong thread! But anyway:

Question, Have finally got the script working, now need to know if it can do this... I want to have a link

The world's best site
http://www.theworldsbestsite.com

then...

Rate it | Review It | ect...

And then have the review posted by who ever reviewed it...

A really great site, topping on the world's best but not quite number one. Signed the world's best critic.

Yeah I guess you want to use other info that's in the links.db Yeah shouldn't be a problem. Can be done by putting the require links.def command in site_html-templates site_html_comments_page and then using get record below it. If this is what you want to do I'll post some codes to hepl you.


But I want to have the latest review posted beneath the link on the Links page with a link to the remaining reviews should there be any. If there are not any more reviews, would have it set up so the link would not be there??? Any suggestions??? Thought of trying to use the rating part of the script....?

I've set up comments.def to include things that could be used later ie. 'isNew' and 'Date'
I was going to look at building a whats a new page of reviews but haven't had the time. I havent looked but lastlinks could prob be altered to do part of what you want



Good Luck!

Glenn


http://mir.spaceports.com/~glennu/
Quote Reply
Re: Glennu Mod In reply to
Sorry about the wrong post, I am talking about comments2. I am trying to make some changes to the globals to put the review of the link below the link sort of like Amazon.com does for their book reviews. Been getting the dreaded 500error when I make changes to the global...

Trust in your elders, for they hold the key to life...