View previous topic :: View next topic |
Author |
Message |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue May 17, 2005 7:05 am Post subject: Anti-Leech Hack (HTML/IMAGE) |
|
|
This little hack will allow you to show a no-leeching image when a user links
to one of your images or a 403 Error if it's a file. When using Abyss's feature
for Anti-Leech, you only have the option to choose one URL, whether its an
image or an HTML webpage, this script will allow you to do both.
First you will need to create error403.php
Replace the anti_leech_image.gif with your image file.
File_name: error403.php [Edited: 10/19/05]
Code: |
<?php
$type = $_SERVER["REQUEST_URI"];
if (eregi("\.jpg$|\.jpeg$|\.gif$|\.png$|\.bmp$", $type)) {
header("Location: /anti_leech_image.gif");
exit;
}else{
header("Location: /403.html");
exit;
}
?>
|
Now you need to create 403.html, which will be your
HTML Error page. I provided an error page below.
File_name: 403.html
Code: |
<HTML>
<HEAD>
<TITLE>Error 403</TITLE>
</HEAD>
<BODY>
<H1>Error 403</H1><P>Forbidden</P>
<p><HR>Powered by <b><i>Abyss Web Server</i>
</b> X1<br>© <a href="http://www.aprelium.com">
Aprelium Technologies</a> - 2001-2006</p>
</BODY>
</HTML>
|
Installation:
Open your Abyss Web Server console and browse to {Host} Configure ->
Custom Error pages, click add and add "Status Code: 403" and add the
"Associated URL: /error403.php". Click Ok and restart Abyss.
Note: In the Anti-Leech section of Abyss Web Server, do not set the
parameter for "Redirect Leechers to URL", Error 403 will be used. :-)
Now you have Image/File (Anti-Leech Protection)
Sincerely, TRUSTAbyss
Last edited by TRUSTAbyss on Mon Aug 14, 2006 2:13 am; edited 7 times in total |
|
Back to top |
|
|
robotfood -
Joined: 27 Apr 2005 Posts: 1
|
Posted: Mon May 23, 2005 8:04 pm Post subject: |
|
|
i had a big problekm with this. Thank You very much!! |
|
Back to top |
|
|
Goatie.dk -
Joined: 11 Feb 2005 Posts: 125 Location: Denmark > Herning
|
Posted: Wed Oct 19, 2005 5:57 am Post subject: |
|
|
Just tried it.. but it seems not to work for me in some weird way...
I know the topic is old.. but i hope somebody could tell me what's wrong.
I'm running aws x1 on xp pro sp2 and did what the tutorial said. _________________ The insane dane who loves AWS :D
http://home.goatie.dk <- pic = online.. no pic, guess ;P |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed Oct 19, 2005 6:14 am Post subject: |
|
|
Look at the top for the newly updated code :-)
It seems that Abyss Web Server no longer uses the REDIRECT_URL_REQUEST_
URI environment variable and thats why it failed to work. This new code works!
Sincerely , TRUSTpunk
Last edited by TRUSTAbyss on Wed Oct 19, 2005 6:30 am; edited 1 time in total |
|
Back to top |
|
|
Goatie.dk -
Joined: 11 Feb 2005 Posts: 125 Location: Denmark > Herning
|
Posted: Wed Oct 19, 2005 6:28 am Post subject: |
|
|
Thanks.. I'll try it out right away :D
--EDIT--
Still doesn't work.. you can check it out on http://3xm.frac.dk/test.html _________________ The insane dane who loves AWS :D
http://home.goatie.dk <- pic = online.. no pic, guess ;P |
|
Back to top |
|
|
Goatie.dk -
Joined: 11 Feb 2005 Posts: 125 Location: Denmark > Herning
|
Posted: Wed Oct 19, 2005 7:31 am Post subject: |
|
|
Are you still there Josh? _________________ The insane dane who loves AWS :D
http://home.goatie.dk <- pic = online.. no pic, guess ;P |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Wed Oct 19, 2005 7:36 am Post subject: |
|
|
Are you sure that you have Anti-Leeching enabled? You have to choose
a path to the file/folder/pattern that will be monitored for Leeching. Now
once you add a path, try the script again and it will work.
Last edited by TRUSTAbyss on Mon Aug 14, 2006 2:11 am; edited 1 time in total |
|
Back to top |
|
|
Goatie.dk -
Joined: 11 Feb 2005 Posts: 125 Location: Denmark > Herning
|
Posted: Wed Oct 19, 2005 7:47 am Post subject: |
|
|
Ah.. so that's where I went wrong.
Didn't know I had to edit anything in the anti-leeching thingie.
All I did understand was that I had to create the files, upload them and make a custom error page for 403.
Sorry for bothering you with this little detail.. think I'll better go to bed. My brain doesn't work very well after 37+ hours without sleep. _________________ The insane dane who loves AWS :D
http://home.goatie.dk <- pic = online.. no pic, guess ;P |
|
Back to top |
|
|
Tim1681 -
Joined: 17 Jan 2005 Posts: 160 Location: Bristol, CT, USA
|
Posted: Mon Feb 27, 2006 2:32 am Post subject: *** TESTING *** |
|
|
***TESTING SCRIPT****
_________________ mysql> SELECT * FROM users WHERE clue > 0;
0 rows returned.
|
|
Back to top |
|
|
|